

Discover more from hrbrmstr's Daily Drop
Drop #114 (2022-10-05): The [Command Line] Replacement Killers
bonk; rmx; Rethinking Ballot Selfies
The Rust community seems heck bent on replacing time-worn utilities with modern crustacean counterparts. We'll cover two of them in this edition along with a link to a resource to help folks in the U.S. stay out of jail this election season.
bonk
Both of today's replacement utilities are one-hit wonders in that they do one thing and do it well. They are also so focused that you're going to fly through today's edition.
Bonk is a "blazingly fast touch [command] alternative."
That description is a tad misrepresentative since bonk
is really a replacement for both touch
and mkdir -p
.
You can't use the built-in touch
to do something like this:
$ touch /tmp/some/directory/path/and/file.txt
if the full directory path does not exist. You first need to mkdir -p
the path, then touch the file.
Bonk lets you do it all in one go:
$ bonk /tmp/some/directory/path/and/file.txt
It's both a command line tool (cargo install bonky
— note the ending y
) and a Rust crate, so you can use it in Rust projects to gain similar functionality.
rmx
There are many ways to delete files and full directory trees on the command line. If you have a deeply nested tree with scads of files (Hi, Xcode!) deleting it can take some time, even on modern SSDs. How to perform this action quickly on *nix and Windows systems is a regularly asked question, especially for folks new to the command line on any given platforms.
Rmx aims to make potentially destroying your Windows/*nix system (i.e. if you mistakenly perform an rm -rf /
) lightning quick. The speed boost primarily comes from the jwalk crate, which performs massively parallel directory traversals.
Rmx has a "safe mode" version, in that it can integrate with your OS' "trashcan" facility to make it easier to recover from an errant delete.
The speed boost is real, too. Here's a vis of the rmx benchmark table in the README:
cargo install rmx
should work on any system to install the utility, and it's a full drop-in replacement for rm
.
Rethinking Ballot Selfies
Midterm elections are almost upon us over here in the Colonies, and there is the real potential for all sorts of negative outcomes not only in who gets elected, but also in your personal experience at the ballot box. Depending on where you live —, and especially in what are generally called "swing" or "battleground" states — you're likely to come across (I'll be kinder than I should) "observers" who will do what they can to invalidate your vote if they suspect you're voting for the "wrong" side.
These brigands are also looking to intimidate and incarcerate ideologically unfriendly Members of the Press.
The Reporters Committee for Freedom of the Press (RCFP) (@rcfp) put together an Election Legal Guide that provides an overview of legal issues that journalists — and ordinary citizens/volunteers — may face while reporting on the 2022 midterm elections, or just trying to vote/help others vote.
Say you're one of those influencer-wannabes and decided to take a selfie as you fill out your ballot. Did you know that may be a criminal offense in your state/jurisdiction? While I seem to recall signs saying "no cell phones" in various places we've voted in-person at, I cannot imagine that being truly "a thing" in this age of self-inflicted surveillance. Still, selfies may just get you an up close and personal meeting with law enforcement:
"Ballot selfies" are a social media staple, and may be used by journalists to demonstrate current political trends or to inform the public of any potential issues with the election process. The publication of ballot selfies or marked ballot photos should be permitted if they are obtained lawfully. Before taking ballot selfies or photos of voters at the polls, journalists and members of the public should ensure that their actions are permitted by state law. The National Conference of State Legislatures (NCSL) has a helpful online resource with information on ballot and polling place photography laws by state. Journalists should confirm that the laws cited are still current before relying on them. A brief summary of current law on ballot selfies is detailed below.
Generally, ballot selfies are considered a form of political speech. Political endorsements are considered a bedrock of the electoral process and a vital form of political expression. However, some fear that ballot selfies and other ballot photographs may encourage voter coercion or vote buying. To combat these fears, many states have adopted laws that prohibit photographing election ballots or sharing a photograph of a marked ballot with others.
You can look up your state's policy on ballot selfies here.
While you may not be a reporter, the RCFP election guide has lots of good information that most State residents likely do not know since most municipalities stopped teaching civics a while ago (which is a big reason we're in the awful state we're in). If you're an "activist" or just someone who volunteers with voter outreach organizations, you should also hit up the guide to ensure you know what lines not to cross.
FIN
So, where's everyone headed if Musk follows through on his bid for Twitter this time 'round? ☮