"This is my song And nothing can make it die It's been so long and it's stronger I know why" — Labi Siffre, My Song ( YouTube ) Note: Some blog posts advocate for a way of doing something. This is not that. This post is to document what works for me. An mpv install on aarch64-darwin consists of two things: An mpv binary. An mpv.app package that can be installed to…
I use Lix on aarch64-darwin without home-manager or nix-darwin . When I tried to upgrade my installation, I saw the error: $ nix upgrade-nix => error: path '/nix/store/ggppip3wfx4vbdc0kxsdniw118viymdg-lix-2.93.2' does not exist and cannot be created After going down the rabbithole, I figured out the issue. My nix.conf was missing two crucial lines: # append to…
Rust’s log crate crate is a thin macro interface for logging that can plug in to many different backends. Its functions can be called just like println! : let you = "cow" .to_string(); let name = "moo" .to_string(); // There's also log::log, log::warn, and so on. log::info ! ( "Hello {animal}, {} to you" , greeting); I wanted to wrap it to add a prefix [farm] so the output looks like:…
Rotary dial telephones are a fantastic way to start learning about electronics. They’re built to be disassembled and serviced (because they were originally rented!) . There are online communities of engineers and enthusiasts who are happy to to share what they know. Most of all, they’re beautiful objects that inspire curiosity and nostalgia. Here’s what I’ll be making: It’s a GPO (General Post…
I had to install NixOS on my Raspberry Pi 4, Model B recently. I didn’t have the HDMI→ micro HDMI cable so I decided to install it headlessly. This is a fairly intricate setup because I wanted to: Cross-compile from aarch64-darwin → aarch64-linux . Remote build using nixbuild.net to speed up build times. Build from my memory-constrained 1GB Raspberry Pi.* It involved a few gotchas which I want to…
I use Nix Flakes on OSX to setup my development environment. I’ve not seen anyone else document this approach. Maybe you will find it useful. What’s in a development environment? By “development environment,” I mean three things: Adding and mutating shell environment variables (e.g. $EDITOR ) Installing command line applications (e.g. /usr/bin/nvim ) Adding config files (e.g.…
In this post, I’ll demonstrate how to score an animation using Orca . What is Orca? The final score What is a score? Learning how to wait Wiring up sounds Timers in practice Conclusion
While NixOS fully supports making restic backups using Backblaze, I couldn’t find documentation for it. From browsing configs on GitHub, many people seem to also use rclone but I’d rather not introduce another dependency. Here’s how I did it: { config , pkgs , ... }: { environment . systemPackages = [ pkgs . restic ]; services . restic . backups . myaccount = { initialize = true ; # since this…
In NixOS, it’s sometimes desirable to override a package in order to extend or modify its behavior. For example, I override my Neovim to add plugins so they get all the benefits of being in the nix store. Here’s how I do it.
This is a list of places in Rust where implementing a trait or using a struct affects the syntax of your code. I think of these features as “magical” because using them can change the behavior of very basic Rust code ( let , for-in , & , etc.). What follows is a small list of (hopefully) illustrative examples, and a short epilogue pointing you to more articles if this topic interests you.
In Jon Gjengset’s Demystifying Unsafe Code talk at Rust NYC, he gives a very interesting example of unsafe code. Here’s the link– please go and watch it– but I’ve transcribed it here along with my paraphrased explanation.
A Few Things Like These (Ippatiyum Cila Vicayankal) Among birds, I like crows very much. It's true; it is a thieving creature tactfully snatching away the eats from the hands of children. In deed, it is a foolish creature visiting and perching on the compound wall of the house and caws at the oddest hours. Even then isn't it my friend who looks at me and calls out to me in my village…
In the following code, how can you test that Player is making the correct API calls? struct Player< 'a > { api: &'a Api, } impl < 'a > Player< 'a > { pub fn new(api: &'a Api) -> Player< 'a > { Player { api } } pub fn play( & self, song: &str ) { self.api.sing(song); } pub fn stop( & self) { self.api.shush(); } }
Here’s how you add a wireless printer to Sway . You’ll need the following tools: CUPS , the “standards-based, open source printing system” Avahi for wireless support nss-mdns , so we can refer to the printer as <hostname>.local (e.g. myprinter.local )
By translating these poems, we aim to memorialize Xu, share some of his excellent literary work, and spread awareness that the harsh conditions, struggles and aspirations of Chinese migrant workers (including but not limited to Foxconn) have not diminished since the more widely-publicized spate of 18 attempted Foxconn suicides in 2010 , resulting in 14 deaths. Insiders report that thereafter,…
Looking to keep the [Soviet–Afghan] war fueled, Washington– where the prevailing ethos was to bleed the Russians until the last Afghan– financed textbooks for schoolchildren in refugee camps that were festooned with illustrations of Kalashnikovs, swords, and overturned tanks. One such edition declared: “Jihad is a kind of war that Muslims fight in the name of God to free Muslims… If infidels…
One result of all the outside attention was the 2004 constitution [of Afghanistan], drafted with heavy Western input and hailed as one of the world’s most progressive. In addition to protecting basic civil liberties and minority rights, the document guaranteed women 25 percent of parliamentary seats (surpassing the proportion in the US Congress). – No Good Men Among The Living (2014) by Anand…
Something that Republican presidents love to do on their first day of office which is reinstate something known as the “global gag rule,” which is that agencies around the world which receive US support for their health programs are not allowed to provide abortion of contraception services or even talk about them– hence the name “gag rule.” We love when we talk about foreign and national security…
This past January, when I started [teaching the post-emancipation African American history survey course], Obama was running in the primary against Hillary Clinton. Many of us still presumed that Clinton was going to be the nominee and then Obama became a movement over the next several months. I was watching this transpire in my course. I told my students in the beginning of the course I would not…
Working-class politics had so little room to maneuver in hard times that racial sympathy was shoved aside. In a famous 1844 public correspondence with the abolitionist Gerrit Smith, labor reformer George Henry Evans spoke for many labor leaders when he declared himself “formerly” an advocate of abolition: “This was before I saw that there was white slavery.” […] Workers on the very bottom may have…
It may surprise you or not surprise you that when we went to Iraq in 2007, General Petraeus and I said, “Do you know why these people fighting? Show us the data,” no study like the Vietcong Motivation & Morale Study (1966), pdf had ever been done. That was the period when the Secretary of Defense and military commander on the ground used to describe the enemy as “evil-doers” and say that “the…
The destroyers of the tea were dressed to look like indians and also professed imitate their speech they gave a “War Whoop” and the chiefs among them used an otherwise “unintelligible” mock Indian language which was then supposedly relayed to the other men aboard the ships via an interpreter. Accounts at that time noted the dialect, the “jargon” were the “most hideous Noise” that the participants…
Years ago, I read a book by historian John Cell called The Highest Stage of White Supremacy. In it, Cell looked at what he called Herrenvolk Democracy. These are societies that function democratically for a certain portion of the population but in which one large portion of the population was excluded from the right to democratic practices. He compared South Africa, the Jim Crow South, and he…
Some discouragement, some faintness of heart at the new real future which replaces the imaginary, is not unusual, and we do not expect people to be deeply moved by what is not unusual. That element of tragedy which lies in the very fact of frequency has not yet wrought itself into the coarse emotion of mankind, and perhaps our frames could hardly bear much of it. If we had a keen vision and…
“Of course, the old thing that we always fear is tending to happen in the Association [the NAACP]. It is tending to become a white man’s organization working for the colored people in which no colored people have any real power.” In the white world, ability, temperament, determination were assets– “the rule of effective work”– but, as his racial experience of nearly half a century cruelly…
As a leading authority on women’s rights, Nancy F. Cott, states, “the suffrage movement since the late nineteenth century had caved in to the racism of the surroundding society, sacrificing democratic principle of the dignity of black people if it seemed advantageous to white women’s obtaining the vote. – W.E.B. Du Bois, 1869-1919: Biography of a Race (1994) by David Levering Lewis
Black performance itself, first of all, was precisely “performative,” a cultural invention, not some precious essence instilled in black bodies; and for better or worse it was often a product of self-commodification, a way of getting along in a constricted world. Black people, that is to say, not only exercised a certain amount of control over such practices but perforce sometimes developed them…
This white paternalism was described most memorably by SNCC veteran and historian Julian Bond, when he barbed: “Rosa [Parks] sat down, Martin [Luther King] stood up, and the white kids came down and saved the day.” Yes, white students did come south to work in the movement, most famously in Freedom Summer: but they learned more than they taught, and what they learned, they carefully and…
Now one final note about the school year and Little Rock. What we don’t often hear about, what we basically never hear about Central High School history, is […] that the governor was so upset about the public relations disaster that accompanied the school’s integration, that he decided to shut down Little Rock public schools the following year. The integration of the school, this great moment of…