This week I read on Tumblr somewhere this intriguing observation:
how come whenever someone gets a silver bullet to kill a werewolf or whatever the shell is silver too. Do they know that part gets ejected or is it some kind of scam
Quite so! Unless you're hunting werewolves with a muzzle-loaded rifle or a blunderbuss or something like that. Which sounds like a very bad idea.
Once you have the silver bullets, presumably you would then make them into cartidge ammunition using a standard ammunition press. And I'd think you would use standard brass casings. Silver would be expensive and pointless, and where would you get them? The silver bullets themselves are much easier. You can make them with an ordinary bullet mold, also available at Wal-Mart.
Anyway it seems to me that a much better approach, if you had enough silver, would be to use a shotgun and manufacture your own shotgun shells with silver shot. When you're attacked by a werewolf you don't want to be fussing around trying to aim for the head. You'd need more silver, but not too much more.
I think people who make their own shotgun shells usually buy their shot in bags instead of making it themselves. A while back I mentioned a low-tech way of making shot:
But why build a tower? … You melt up a cauldron of lead at the top, then dump it through a copper sieve and let it fall into a tub of water at the bottom. On the way down, the molten lead turns into round shot.
That's for 18th-century round bullets or maybe small cannonballs. For shotgun shot it seems very feasible. You wouldn't need a tower, you could do it in your garage. (Pause while I do some Internet research…) It seems the current technique is a little different: you let the molten lead drip through a die with a small hole.
Wikipedia has an article on silver bullets but no mention of silver shotgun pellets.
I googled the original Tumblr post and found that it goes on very amusingly:
catch me in the woods the next morning with a metal detector gathering up casings to melt down and sell to more dumb fuck city shits next month
I was often struck with this thought when my kids were smaller. We would be looking at some object, let's say a bollard.
The kid sees the actual bollard, as it actually appears, and in detail! She sees its shape and texture, how the paint is chipped and mildewed, whether it is straight or crooked.
I don't usually see any of those things. I see the bollard abstractly, more as an idea of a “bollard” than as an actual physical object. But instead I see what it is for, and what it is made of, and how it was made and why, and by whom, all sorts of things that are completely invisible to the child.
The kid might mention that someone was standing by the crooked bollard, and I'd be mystified. I wouldn't have realized there was a crooked bollard. If I imagined the bollards in my head, I would have imagined them all straight and identical. But kids notice stuff like that.
Instead, I might have mentioned that someone was standing by the new bollard, because I remembered a couple of years back when one of them was falling apart and Rich demolished it and put in a new one. The kid can't see any of that stuff.
One of my favorite videogames of the last few years, maybe my most favorite, is Prey. It was published in 2017, and developed by Arkane, the group that also created Dishonored. The publisher (Bethesda) sabotaged Prey by naming it after a beloved 2006 game also called Prey, with which it had no connection. Every fan of Prey (2006) who was hoping for a sequel was disappointed and savaged it. But it is a great, great game.
(I saw a video about the making of the 2017 Prey in which Raphael Colantonio talked about an earlier game of theirs, Dark Messiah of Might and Magic, which was not related to the Might and Magic series. But the publisher owned the Might and Magic IP, and thought the game would sell better if it was part of their established series. They stuck “Might and Magic” in the title, which disappointed all the Might and Magic fans, who savaged it. Then when Bethesda wanted to name Prey (2017) after their earlier game Prey (2006), Colantonio told them what had gone wrong the previous time they tried that strategy. His little shrug after he told that story broke my heart a little.)
This article contains a great many spoilers for the game, and also assumes you are familiar with the plot. It is unlikely to be of interest to anyone who is not familiar with Prey. You have been warned.
(If you're willing to check it out on my say-so, here's a link. I suggest you don't read the description, which contains spoilers. Just buy it and dive in.)
A recent question on Reddit's r/prey
forum asked what would have
happened if the Typhon organisms had not broken out when they did.
The early plot of Prey is all there, but it is a little confusing,
because several things were happening at once. The short answer to
the question though, is that February 22, 2035 would have been the worst day
of Alex Yu's life even if his magnificent space station hadn't been
overrun by terrifying black aliens.
January had contingency plans for at least two situations. One was a Typhon escape, which we know all about.
But there was another plan for another situation. Morgan was having her memory erased before each round of testing. January explains that there was a procedure that was supposed to bring Morgan back up to speed after the tests were over. We know this procedure was followed for some time: Morgan's office has been used. Her assistant Jason Chang still hasn't gotten over his delight at working for such a hot boss. There are puzzled emails around asking why she never remembers her office combination. There's painful email from Mikhaila asking why Morgan is snubbing her. Clearly, at some point in the recent past, Morgan was still walking around the station in between tests, working and talking to people.
January's second contingency plan was in case Alex stopped bringing Morgan back up to speed after each round of tests, and just kept her in the simulation day after day — perhaps even more than once per day. (No wonder her eye is red!) And crucially, that plan was already in motion on February 22, the day the Typhon escaped.
The first thing that happens to the player in Prey is that Morgan fails all the tests. (“Is she…” “Yes, she's… hiding behind the chair.”) Why? We find out later Morgan was supposed to receive neuromods that would give her Typhon powers such as mimicry. They didn't. Marco Simmons says he installed exactly what Patricia brought down. There's email in the sim lab that asks Neuromod to check that something isn't wrong with the production process. But nothing is wrong with the production process. What really went wrong is that January had secretly replaced the neuromods with fakes, so that when they were removed from Morgan's brain, her memory wouldn't be affected. The next time Morgan woke up in her apartment and it was still March 15, she would realize what was happening.
It's hard to guess just what would have happened next, but I'm sure it would have been rather dramatic.
There are at least five other situations that would have blown up that same day. February 22 2035 on Talos I was always going to be an incredible shitshow.
Emmanuel Mendez
Because Frank Jones is a fuckup, Emmanuel Mendez has become aware that the escape pods don't work. He has decided to alert the crew by reprogramming the giant floating billboards to display “ESCAPE PODS ARE FAKE”. He completes this task on February 22 but dies without activating the program that will change the display.
Those billboards are visible from everywhere on the station, including the cafeteria.
Halden Graves
Halden Graves, head of the Neuromod Division, has just figured out that the neuromods, even the non-Typhon ones, are made with exotic material from the Typhon, and he completely loses his shit, to the point of chopping open his own head to get them out. That might attract some attention.
Josh Dalton
On February 22, Josh Dalton murdered Lane Carpenter with the BFG 9000 and then fled with it into the GUTS.
Alton Weber
Weber is on the Life Support security team. He has had a paranoid breakdown and stolen a shotgun. There's probably going to be a firefight outside the Life Support restrooms.
Mikhaila Ilyushin
Mikhaila is about to be arrested. Alex already suspected that something about her was fishy. Mikhaila has sent Divya Naaz to install snooping devices in the doors in Psychotronics, and Divya has been caught. Alex isn't going to wait any longer to stop Ilyushin.
These are starting to fall apart but the shit won't really hit the fan until sometime after February 22.
Annelise Gallegos and Quinten Purvis
Annelise Gallegos has been overcome by her conscience and is blowing the whistle on the experiments in Psychotronics and the murder of the “Volunteers”. On February 22, Alex has ordered Sarah Elazar to arrest her, as soon as her shift is over. The Typhon escape prevents that. What would have happened to Gallegos? I suspect she would would have died in an ⸢unfortunate accident⸣.
But it's too late for the Yus. Gallegos has already prepared her thumb drive with all the damning evidence, and Quinten Purvis has hidden with it in a cargo container. If the Typhon hadn't gotten loose that day, he would have been on his way to Earth with it.
Hunter Hale
Shuttles are supposed to take the Volunteers back to Earth when their service is complete. The Shuttle Bay flight control staff have recently noticed that the shuttles are not going straight back to Earth, but are stopping somewhere else just after leaving, and then proceeding to Earth on a slightly altered course.
What's really happening is that the shuttle pilot, Hunter Hale, makes a stop at the Psychotronics airlock and drops off some or all of the Volunteers so they can be turned into Neuromods.
Alex is paying Hale five times the normal salary to keep his mouth shut about this, but HR has noticed and is asking questions about it. Between the flight control staff and HR, the truth is going to come out.
Sarah Elazar
Elazar suspects that the Yus are up to something dirty. She doesn't know what yet, but she's going to find out.
Disappearing neuromods
Everyone seems to be pilfering neuromods. Emmanuella Da Silva has some stashed in the drop ceiling of the Shuttle Bay locker room. Yuri Kimura has four under her desk, and Elias Black is blackmailing her. Lorenzo Calvino has some in both of his secret safes. Lily Morris has them hidden in the fire alarms in half a dozen places around the station. That dumbass Grant Lockwood has tried to walk back to Earth with his stolen neuromods.
I probably missed a few, they're all over.
(I said none of this would come to light until after February 22, but it won't be long before someone wonders what became of Lockwood. It's also possible Alex will find out about the Lily Morris conspiracy that day, from Eddie Voss. I almost feel sorry for Alex.)
Not giant disasters, but troublesome nevertheless.
Lorenzo Calvino
It won't be long before someone, probably Miyu Okabe, figures out that Lorenzo Calvino has a severe, progressive mental impairment.
Price Broadway
Broadway, the alcoholic in Waste Processing, is endangering everyone's lives by leaving empty vodka bottles in the eel tanks. His supervisor knows and has reported him to HR. She says HR will help, but I imagine they'll just fire him.
Maybe he'll end up on Hunter Hale's shuttle home.
Volunteers
What's up with the Volunteers in the dormitory in Neuromod Division? Some of them are stealing and selling supplies. Other are stealing dangerous equipment and weapons. What for?
Even without the Typhon, Prey could have been a great game!
You play Morgan, of course. The first fifteen minutes are the same, right up until Bellamy would have died.
When you wake up for the second time on March 15, you figure out what is happening, and confront the Sim Lab staff. You escape, go rogue, and make your way to the Arboretum to confront Alex. Meanwhile all sorts of stuff is going down. Alton Weber is on a rampage in Life Support. Josh Dalton is loose in the GUTS. You'll have to deal with him to get to the Arboretum. (What, did you think you were going to take the elevator?) Somewhere along the line you find out about Purvis in the cargo container and have to decide how to handle that. And then Mendez changes the billboards and there's a panic…
A lot is happening on Talos I. I probably left something out.
(The shortage of escape pods doesn't count. Someone would have noticed long ago that there aren't nearly enough. I think we have to assume that there are more escape pods than we see in the game. Perhaps Morgan's simulation omitted them.)
(And in my headcanon, that poor schmuck Kevin Hague never does find out his wife has cheated on him with the asshole football star.)
Let me know what I missed.
The Recurse Center Zulip chat now has an Etymology channel, courtesy of Jesse Chen, so I have been posting whenever I run into something interesting. This is a summary of some of my recent discoveries. Everything in this article is, to the best of my knowledge, accurate. That is, there are no intentional falsehoods.
I tracked down the meaning of (Arabic) baba ghanouj. It was not what I would have guessed.
Well, sort of. Baba is “father” just like in every language. I had thought of this and dismissed it as unlikely. (What is the connection with eggplants?) But that is what it is.
And ghanouj is …
“coquetry”.
So it's the father of coquetry.
Very mysterious.
Toph asked me if “nog” appeared in any word other than “eggnog”. Is there lemonnog or baconnog? I had looked this up before but couldn't remember what it was except that it was some obsolete word for some sort of drink.
“Nog” is an old Norfolk (England) term for a kind of strong beer which was an ingredient in the original recipe, sometime in the late 17th or early 18th century.
I think modern recipes don't usually include beer.
“Wow!” appears to be an 18th-century borrowing from an indigenous American language, because most of its early appearances are quotes from indigenous Americans. It is attested in standard English from 1766, spelled “waugh!”, and in Scots English from 1788, spelled “vow!”
Katara asked me for examples of words in English like “bear” where there are two completely unrelated meanings. (The word bear like to bear fruit, bear children, or bear a burden is not in any way related to the big brown animal with claws.)
There are a zillion examples of this. They're easy to find in a paper dictionary: you just go down the margin looking for a superscript. When you see “bear¹” and “bear²”, you know you've found an example.
The example I always think of first is “venery” because long, long ago Jed Hartman pointed it out to me: venery can mean stuff pertaining to hunting (it is akin to “venison”) and it can also mean stuff pertaining to sex (akin to “venereal”) and the fact that these two words are spelled the same is a complete coincidence.
Jed said “I bet this is a really rare phenomenon” so I harassed him for the next several years by emailing him examples whenever I happened to think of it.
Anyway, I found an excellent example for Katara that is less obscure than “venery”: “riddle” (like a puzzling question) has nothing to do with when things are riddled with errors. It's a complete coincidence.
The “bear” / “bear” example is a nice simple one, everyone understands it right away. When I was studying Korean I asked my tutor an etymology question, something like whether the “eun” in eunhaeng 은행, “bank”, was the same word as “eun” 은 which means “silver”. He didn't understand the question at first: what did I mean, “is it the same word”?
I gave the bear / bear example, and said that to bear fruit and to bear children are the same word, but the animal with claws is a different word, and just a coincidence that it is spelled the same way. Then he understood what I meant.
(Korean eunhaeng 은행 is a Chinese loanword, from 銀行. 銀 is indeed the word for silver, and 行 is a business-happening-place.)
The right arm is the "right" arm because, being the one that is (normally) stronger and more adept, it is the right one to use for most jobs.
But if you ignore the right arm, there is only one left, so that is the "left" arm.
This sounds like a joke, but I looked it up and it isn't.
"Left" is the past tense passive of "leave". As in, I leave the room, I left the room, when I left the room I left my wallet there, my wallet was left, etc.
(As noted above, this is also where we get the left side.)
There are two other words "leave" in English. Leaves like the green things on trees are not related to leaving a room.
(Except I was once at a talk by J.H. Conway in which he was explaining some sort of tree algorithm in which certain nodes were deleted and he called the remaining ones "leaves" because they were the ones that were left. Conway was like that.)
The other "leave" is the one that means "permission" as in "by your leave…". This is the leave we find in "sick leave" or "shore leave". They are not related to the fact that you have left on leave, that is a coincidence.
Latin norma is a carpenter's square, for making sure that things are at right angles to one another.
So something that is normal is something that is aligned the way things are supposed to be aligned, that is to say at right angles. And a norm is a rule or convention or standard that says how things ought to line up.
In mathematics and physics we have terms like “normal vector”, “normal forces” and the like, which means that vectors or forces are at right angles to something. This is puzzling if you think of “normal” as “conventional” or “ordinary” but becomes obvious if you remember the carpenter's square.
In contrast, mathematical “normal forms” have nothing to do with right angles, they are conventional or standard forms. “Normal subgroups” are subgroups that behave properly, the way subgroups ought to.
The names Norman and Norma are not related to this. They are related to the surname Norman which means a person from Normandy. Normandy is so-called because it was inhabited by Vikings (‘northmen’) starting from the 9th century.
Jesse Chen observed that hydrogen means “water-forming”, because when you burn it you get water.
A lot of element names are like this. Oxygen is oxy- (“sharp” or “sour”) because it makes acids, or was thought to make acids. In German the analogous calque is “sauerstoff”.
Nitrogen makes nitre, which is an old name for saltpetre (potassium nitrate). German for nitre seems to be salpeter which doesn't work as well with -stoff.
The halogen gases are ‘salt-making’. (Greek for salt is hals.) Chlorine, for example, is a component of table salt, which is sodium chloride.
In Zulip I added that The capital of Denmark, Copenha-gen, is so-called because in the 11th century is was a major site for the production of koepenha, a Germanic term for a lye compound, used in leather tanning processes, produced from bull dung. I was somewhat ashamed when someone believed this lie despite my mention of bull dung.
Spas (like wellness spa or day spa) are named for the town of Spa, Belgium, which has been famous for its cold mineral springs for thousands of years!
(The town of Bath England is named for its baths, not the other way around.)
The coach is named for the town of Kocs (pronounced “coach”), Hungary, where it was invented. This sounds like something I would make up to prank the kids, but it is not.
“Iglesia” is Spanish for “church”, and you see it as a surname in Spanish as in English. (I guess, like “Church”, originally the name of someone who lived near a church).
Thinking on this, I realized: “iglesia” is akin to English “ecclesiastic”.
They're both from ἐκκλησία which is an assembly or congregation.
In German, a hedgehog is “Igel”. This is a very ancient word, and several other Germanic languages have similar words. For example, in Frisian it's “ychel”.
In Swedish, “igel” means leech. The hedgehog is “igelkott”.
I tried to find out what -kott was about. “kotte” is a pinecone and may be so-called because “kott” originally meant some rounded object, so igelkott would mean the round igel rather than the blood igel, which is sometimes called blodigel in Swedish.
I was not able to find any other words in Swedish with this sense of -kott. There were some obviously unrelated words like bojkott (“boycott”). And there are a great many Swedish words that end in -skott, which is also unrelated. It means “tail”. For example, the grip of a handgun is revolverskott.
[ Addendum: Gustaf Erikson advises me that I have misunderstood ‑skott; see below. ]
Bonus hedgehog weirdness: In Michael Moorcock's Elric books, Elric's brother is named “Yyrkoon”. The Middle English for a hedgehog is “yrchoun” (variously spelled). Was Moorcock thinking of this? The -ch- in “yrchoun” is t͡ʃ though, which doesn't match the stop consonant in “Yyrkoon”. Also which makes clear that “yrchoun” is just a variant spelling of “urchin”. (Compare “sea urchin”, which is a sea hedgehog. or compare “street urchin”, a small round bristly person who scuttles about in the gutter.)
In Italian a hedgehog is riccio, which I think is also used as a nickname for a curly-haired or bristly-haired person.
These are not related. Schlub is originally Polish, coming to English via (obviously!) Yiddish. But slob is Irish.
I tried to guess the French word for a female chiropractor. I guessed “chiropracteuse" by analogy with masseur, masseuse, but I was wrong. It is chiropractrice.
The '‑ice' suffix was clearly descended from the Latin '‑ix' suffix, but I had to look up ‘‑euse’. It's also from a Latin suffix, this time from ‘‑osa’.
When you jot something down on a notepad, the “jot” is from Greek iota, which is the name of the small, simple letter ι that is easily jotted.
Bonus: This is also the jot that is meant by someone who says “not a jot or a tittle”, for example Matthew 5:18 (KJV):
For verily I say unto you, Till heaven and earth pass, one jot or one tittle shall in no wise pass from the law, till all be fulfilled.
A tittle is the dot above the lowercase ‘i’ or ‘j’. The NIV translates this as “not the smallest letter, not the least stroke of a pen”, which I award an A-plus for translation.
I read something that suggested that these were cognate, but they are not.
“Vilify” is from Latin vīlificō which means to vilify. It is a compound of vīlis (of low value or worthless, I suppose the source of “vile”) and faciō (to make, as in “factory” and “manufacture”.)
A villain, on the other hand, was originally just a peasant or serf; that is, a person who lives in a village. “Village” is akin to Latin villa, which originally meant a plantation.
I had always assumed that “Döner” and its “ö” were German, but they are not, at least not originally. “Döner kebab” is the original Turkish name of the dish, right down to the diaresis on the ‘ö’, which is the normal Turkish spelling; Turkish has an ‘ö’ also. Döner is the Turkish word for a turning-around-thing, because döner kebab meat roasts on a vertical spit from which it is sliced off as needed.
“Döner” was also used in Greek as a loanword but at some point the Greeks decided to use the native Greek word gyro, also a turning-around-thing, instead. Greek is full of Turkish loanwords. (Ottoman Empire, yo.)
“Shawarma”, another variation on the turning-around-vertical-spit dish, is from a different Ottoman Turkish word for a turning-around thing, this time چویرمه (çevirme), which is originally from Arabic.
The Armenian word for shawarma is also shawarma, but despite Armenian being full of Turkish loanwords, this isn't one. They got it from Russian.
Everyone loves that turning-on-a-vertical-spit dish. Lebanese immigrants brought it to Mexico, where it is served in tacos with pineapple and called tacos al pastor (“shepherd style”). I do not know why the Mexicans think that Lebanese turning-around-meat plus pineapples adds up to shepherds. I suppose it must be because the meat is traditionally lamb.
To roll is to turn over with a circular motion. This motion might wind a long strip of paper into a roll, or it might roll something into a flat sheet, as with a rolling pin. After rolling out the flat sheet you could then roll it up into a roll.
Dinner rolls are made by rolling up a wad of bread dough.
When you call the roll, it is because you are reading a list of names off a roll of paper.
Theatrical roles are from French rôle which seems to have something to do with rolls but I am not sure what. Maybe because the cast list is a roll (as in roll call).
Both of these are Australian animals. Today it occurred to me to wonder: are the words related? Is -bat a productive morpheme, maybe a generic animal suffix in some Australian language?
The answer is no! The two words are from different (although distantly related) languages. Wombat is from Dharug, a language of the Sydney area. Numbat is from the Nyungar language, spoken on the other end of the continent.
Gustaf Erikson advises me that I have misunderstood ‑skott. It is akin to English shoot, and means something that springs forth suddenly, like little green shoots in springtime, or like the shooting of an arrow. In the former sense, it can mean a tail or a sticking-out thing more generally. But in revolverskott is it the latter sense, the firing of a revolver.
[ Content warning: Rambly. ]
Two Jehovah's Witnesses came to the door yesterday and at first I did not want to talk to them but as they were leaving I remembered that I had a question. I asked them what they called the days of the week. They were very puzzled by this because it turns out that they call them Monday, Tuesday, Wednesday, Thursday, and so on, just like everyone else in this country. They were so puzzled that they did not even take the opportunity to contine the conversation. They thanked me for coming to the door, and left.
I found this interesting. The reason I had asked is that the JW religion is very strict regarding paganism. For example, they do not observe Christmas or Easter, because these holidays, to them, have a suspicious pagan origin. A few months ago I had wondered: do they celebrate Thanksgiving? I thought it was possible. As far as I know it has no pagan connection at all, and an observance of giving thanks to Jehovah seemed consistent with their beliefs. No, it turns out that they don't, on the principle that to single out one special day might lead them to neglect to give proper thanks to Jehovah on the other days.
So, I wondered, if they object to Easter, how do they feel about the days of the week? To speak of Tuesday, Wednesday, Thursday, and Friday is to honor the pagan Germanic gods Tyr, Odin, Thor, and Frigg, and I thought they might object to this also. The Quakers referred to the days of the week as First Day, Second Day, and so on for this reason, and I thought that the Witnesses might too. But the issue appears to have flown under the JWs' radar.
I didn't ask about the months, assuming that if they didn't cringe when speaking of Thor's Day, they wouldn't have a problem with the month of Janus (the two-faced god of boundaries) or with Maia (her fertility festival is in May) or with the month of the deified person of Roman Emperor Augustus.
I have a sense that Quakers are generally more sophisticated thinkers than Jehovah's Witnesses. They objected to the names of the months also, but decided it would be too confusing to change them. But they saw their opportunity in 1752, when the Kingdom of Great Britain finally brought its calendar in line with the rest of Europe. Along with the other calendrical changes, the Quakers agreed amongst themselves to start calling the months after numbers instead of the old-style names.
I had a conversation once with Larry Wall, who is himself a devout Christian. We were talking about Jehovah's Witnesses, because at that time there was a prominent member of the Perl community who was one. Larry, not at all a venomous person, said with some venom, that the JWs were “a cult”.
“A ‘cult’?” I asked. “What do you mean?” People often use the word cult as a pejorative for “sect” or religion: a cult is any religion that I don't like. But Larry, as usual, was wiser and more thoughtful than that. He said that he called them a cult because you are not allowed to leave. If you do, the other JWs, even your close friends and your family, are no longer allowed to associate with you, and if they do, they may be threatened with expulsion.
I thought that seemed like a principled definition, and it has served me since then. Sometimes, encountering other organizations from which it was difficult to extract onesself, I have heard Larry's voice in my mind, saying “that's a cult”. Thanks, Larry.
I have a draft article about how Larry Wall is my model for a rational, admirable Christian, but I'm not sure it is ever going to come together.
The other day I made some changes to a program, but when I ran the tests they failed in a very bizarre way I couldn't understand. After a bit of investigation I still didn't understand. I decided to try to narrow down the scope of possible problems by reverting the code to the unmodified state, then introducing changes from one file at a time.
My plan was: commit all the new work, reset the working directory back to the last good commit, and then start pulling in file changes. So I typed in rapid succession:
git add -u
git commit -m 'broken'
git branch wat
git reset --hard good
So the complete broken code was on the new branch wat
.
Then I wanted to pull in the first file from wat
. But when I
examined wat
there were no changes.
Wat.
I looked all around the history and couldn't find the changes. The
wat
branch was there but it was on the current commit, the one with
none of the changes I wanted. I checked in the reflog for the commit
and didn't see it.
Eventually I looked back in my terminal history and discovered the
problem: I had a Git pre-commit
hook which git-commit
had
attempted to run before it made the new commit. It checks for strings
I don't usually intend to commit, such as XXX
and the like.
This time one of the files had something like that. My pre-commit
hook had printed an error message and exited with a failure status, so
git-commit
aborted without making the commit. But I had typed the
commands in quick succession without paying attention to what they
were saying, so I went ahead with the git-reset
without even seeing
the error message. This wiped out the working tree changes that I had
wanted to preserve.
Fortunately the git-add
had gone through, so the modified files were
in the repository anyway, just hard to find. And even more
fortunately, last time this happened to me, I wrote up
instructions about what to do.
This time around recovery was quicker and easier. I knew I only
needed to recover stuff from the last add
command, so instead of
analyzing every loose object in the repository, I did
find .git/objects -mmin 10 --type f
to locate loose objects that had been modified in the last ten minutes. There were only half a dozen or so. I was able to recover the lost changes without too much trouble.
Looking back at that previous article, I see that it said:
it only took about twenty minutes… suppose that it had taken much longer, say forty minutes instead of twenty, to rescue the lost blobs from the repository. Would that extra twenty minutes have been time wasted? No! … The rescue might have cost twenty extra minutes, but if so it was paid back with forty minutes of additional Git expertise…
To that I would like to add, the time spent writing up the blog article was also well-spent, because it meant that seven years later I didn't have to figure everything out again, I just followed my own instructions from last time.
But there's a lesson here I'm still trying to figure out. Suppose I want to prevent this sort of error in the future. The obvious answer is “stop splatting stuff onto the terminal without paying attention, jackass”, but that strategy wasn't sufficient this time around and I couldn't think of any way to make it more likely to work next time around.
You have to play the hand you're dealt. If I can't fix myself, maybe I
can fix the software. I would like to make some changes to the
pre-commit
hook to make it easier to recover from something like
this.
My first idea was that the hook could unconditionally save the staged changes somewhere before it started, and then once it was sure that it would complete it could throw away the saved changes. For example, it might use the stash for this.
(Although, strangely, git-stash
does
not seem to have an easy way to say “stash the current changes, but
without removing them from the working tree”. Maybe git-stash save
followed by git-stash apply
would do what I wanted? I have not yet
experimented with it.)
Rather than using the stash, the hook might just commit everything
(with commit -n
to prevent infinite loops) and then reset the commit
immediately, before doing whatever it was planning to do. Then if it
was successful, Git would make a second, permanent commit and we could
forget about the one made by the hook. But if something went wrong,
the hook's commit would still be in the reflog. This doubles the
number of commits you make. That doesn't take much time, because Git
commit creation is lightning fast. But it would tend to clutter up
the reflog.
Thinking on it now, I wonder if a better approach isn't to turn the pre-commit hook into a post-commit hook. Instead of a pre-commit hook that does this:
git-commit
continues and commits the changes)How about a post-commit hook that does this:
Now suppose I ignore the failure, and throw away the staged changes. It's okay, the changes were still committed and the commit is still in the reflog. This seems clearly better than my earlier ideas.
I'll consider it further and report back if I actually do anything about this.
Larry Wall once said that too many programmers will have a problem, think of a solution, and implement it, but it works better if you can think of several solutions, then implement the one you think is best.
That's a lesson I think I have learned. Thanks, Larry.
I see that Eric Raymond's version of the jargon file, last revised December 2003, omits “footgun”. Surely this word is not that new? I want to see if it was used on Usenet prior to that update, but Google Groups search is useless for this question. Does anyone have suggestions for how to proceed?
[ Content warning: extremly miscellaneous. ]
Wow, has it really been 7 months since I did one of these? Surprising, then, how few there are. (I omitted the ones that seemed trivial, and the ones that turned into complete articles.)
Back in 2018 I wrote an article that mentioned two alleys in Tel Aviv and quoted an article from Haaretz that said (in part):
A wealthy American businessman … had christened the streets without official permission… .
Every time I go back to read this I am brought up short by the word “christened”, in an article in Haaretz, in connection with the naming of streets in Tel Aviv. A christening is a specifically Christian baptism and naming ceremony. It's right there in the word!
Orwell's essay on Politics and the English Language got into my blood when I was quite young. Orwell's thesis is that language is being warped by the needs of propaganda. The world is full of people who (in one of Orwell's examples) want to slip the phrase “transfer of population” past you before you can realize that what it really means is “millions of peasants are robbed of their farms and sent trudging along the roads with no more than they can carry”. Writers are exposed to so much of this purposefully vague language that they learn to imitate it even when they are not trying to produce propaganda.
I don't mean to say that that's what the Haaretz writer was doing, intentionally or unintentionally. My claim is only that in this one case, because she wasn't thinking carefully about the meanings of the words she chose, she chose a hilariously inept one. Because of an early exposure to Orwell, that kind of mischoice jumps out at me.
This is hardly the most memorable example I have. The prize for that belongs to my mother, who once, when she was angry with me, called me a “selfish bastard”. This didn't have the effect she intended, because I was so distracted by the poor word choice.
Anyway, the Orwell thing is good. Brief and compelling. Full of good style advice. Check it out.
In 2019, I wrote an article about men who are the husbands of someone important and gave as examples the billionaire husband of Salma Hayek and the Nobel prizewinning husband of Marie Curie. I was not expecting that I would join this august club myself! In April, Slate ran an article about my wife in which I am referred to only as “Kim's husband”. (Judy Blume's husband is also mentioned, and having met him, I am proud to be in the same club.)
Also, just today I learned that Antoine Veil is interred in the Panthéon, but only because he was married to Simone Veil.
In an ancient article about G.H. Hardy I paraphrased from memory something Hardy had said about Ramanujan. In latter years Hardy's book become became available on the Internet, so I was able to append the exact quotation.
A few years ago I wrote a long article about eggplants in which I asked:
Wasn't there a classical Latin word for eggplant? If so, what was it? Didn't the Romans eat eggplant? How do you conquer the world without any eggplants?
I looked into this a bit and was amazed to discover that the Romans did not eat eggplant. I can only suppose that it was because they didn't have any, poor benighted savages. No wonder the Eastern Roman Empire lasted three times as long.
Over the weekend a Gentle Reader sent me an anecdote about getting lost in a Czech zoo. He had a map with a compass rose, and the points of the compass were labeled SVZJ. Gentle Reader expected that S and V were south and west, as they are in many European languages. (For example, Danish has syd and vest; English has “south” and “vvest” — sorry, “west”.
Unfortunately in Czech, S and V are sever, “north”, and východ, east. Oops.
A while back I was thinking about the names of the cardinal directions in Catalán because I was looking at a Catalán map of the Sagrada Família, and observed that the Catalán word for east, llevant is a form of _llevar, which literally means “to rise”, because the east is where the sun rises. (Llevar is from Latin levāre and is akin to words like “levity” and “levitate”.) Similarly the Latin word for “east” is oriēns, from orior, to get up or to arise.
I looked into the Czech a little more and learned that východ, “east”, is also the Czech word for “exit”:
“Aha,” I said. “They use východ for “east” not because that's where the sun comes up but because that's where it enters…”
“…”
“Uh…”
No. Entrance is not exit. Východ is exit. Entrance is vchod.
I dunno, man. I love the Czechs, but this is a little messed up.
I think I recall that sever, “north”, is thought to be maybe akin to “shower”, since the north is whence the cold rains come, but maybe I made that up.
An earlier version of this article had an error about the Catalán. Thanks to Alex Corcoles for pointing this out.
I never mentioned the other Czech compass points. They are: sever, north; východ, east, západ, west, jih, south. Východ seems to be related to Russian восто́к (/vostók/) but I'm not sure how.
20231220: A Gentle Reader asked about the pronunciation of vchod as compared with východ. Is it some unpronounceable Czechism? Nope! I was very pleased with the analogous example I found: the difference is no harder to hear or to say than the difference between “climb” and “keylime”.