Archive:
Subtopics:
Comments disabled |
Fri, 08 Mar 2024 This week I read on Tumblr somewhere this intriguing observation:
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:
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. AddendumI googled the original Tumblr post and found that it goes on very amusingly:
[Other articles in category /tech] permanent link Wed, 06 Mar 2024
Optimal boxes with and without lids
Sometime around 1986 or so I considered the question of the dimensions that a closed cuboidal box must have to enclose a given volume but use as little material as possible. (That is, if its surface area should be minimized.) It is an elementary calculus exercise and it is unsurprising that the optimal shape is a cube. Then I wondered: what if the box is open at the top, so that it has only five faces instead of six? What are the optimal dimensions then? I did the calculus, and it turned out that the optimal lidless box has a square base like the cube, but it should be exactly half as tall. For example the optimal box-with-lid enclosing a cubic meter is a 1×1×1 cube with a surface area of !!6!!. Obviously if you just cut off the lid of the cubical box and throw it away you have a one-cubic-meter lidless box with a surface area of !!5!!. But the optimal box-without-lid enclosing a cubic meter is shorter, with a larger base. It has dimensions $$2^{1/3} \cdot 2^{1/3} \cdot \frac{2^{1/3}}2$$ and a total surface area of only !!3\cdot2^{2/3} \approx 4.76!!. It is what you would get if you took an optimal complete box, a cube, that enclosed two cubic meters, cut it in half, and threw the top half away. I found it striking that the optimal lidless box was the same proportions as the optimal complete box, except half as tall. I asked Joe Keane if he could think of any reason why that should be obviously true, without requiring any calculus or computation. “Yes,” he said. I left it at that, imagining that at some point I would consider it at greater length and find the quick argument myself. Then I forgot about it for a while. Last week I remembered again and decided it was time to consider it at greater length and find the quick argument myself. Here's the explanation. Take the cube and saw it into two equal halves. Each of these is a lidless five-sided box like the one we are trying to construct. The original cube enclosed a certain volume with the minimum possible material. The two half-cubes each enclose half the volume with half the material. If there were a way to do better than that, you would be able to make a lidless box enclose half the volume with less than half the material. Then you could take two of those and glue them back together to get a complete box that enclosed the original volume with less than the original amount of material. But we already knew that the cube was optimal, so that is impossible. [Other articles in category /math] permanent link Mon, 04 Mar 2024
Children and adults see in very different ways
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. [Other articles in category /kids] permanent link Sun, 03 Mar 2024
Even without an alien invasion, February 22 on Talos I would have been a shitshow
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 Morgan escapes the sim lab anywayJanuary 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. But that's not allThere 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.
Coming soonThese are starting to fall apart but the shit won't really hit the fan until sometime after February 22.
Minor shitNot giant disasters, but troublesome nevertheless.
Drama drama dramaEven 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… What else?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. [Other articles in category /games] permanent link Fri, 16 Feb 2024The 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. Baba ghanoujI 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 … So it's the father of coquetry. Very mysterious. EggnogToph 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“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!” RiddlesKatara 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.) Right and leftThe 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. Leave and left"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. Normal normsLatin 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. Hydrogen and oxygenJesse 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, baths, and coachesSpas (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. Spanish churches“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. The mysterious Swedish hedgehogIn 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. Slobs and schlubsThese are not related. Schlub is originally Polish, coming to English via (obviously!) Yiddish. But slob is Irish. -euse vs. -iceI 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’. JotWhen 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):
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. Vilifying villainsI 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. Döner kebabI 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. Roll callTo 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). Wombats and numbatsBoth 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. AddendumGustaf 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. [Other articles in category /lang/etym] permanent link Wed, 14 Feb 2024
The pleasures of dolmen-licking
Ugh, the blog has been really stuck lately. I have lots of good stuff in process but I don't know if I will finish any of it, which would be a shame, because it's good stuff and I have put a lot of work into it. So I thought maybe I should make an effort to relax my posting standards for a bit. In fact I should make an effort to relax them more generally. But in particular, today. So, here is a picture of me licking a dolmen. Here is Michael G. Schwern licking the same dolmen. Not on the same day, obviously. As far as I know we were not in the country at the same time. The question is in my mind: who was the first of us to lick the dolmen? I think he was there before me. But I also wonder: when I decided to lick it, did I know he had done the same thing? It's quite possible that Marty Pauley or someone said to me “You know, when Schwern was here, he licked it,” to which I would surely have responded “then I shall lick it as well!” But it's also possible that we licked the dolmen completely independently, because why wouldn't you? How often to you get a chance to taste a piece of human prehistory? As a little kid you discover that the world is full of all sorts of fascinating stuff that you may be allowed to look at, but not to touch, and certainly not to climb on or to lick. (“Don't put it in your mouth!”) Dolmens are a delightful exception to this rule. Sure, lick the dolmen all you want. It has stood in the same place for five thousand years, and whether it stands there for five thousand more will not be affected by any amount of licking. My inner four-year-old was very satisfied the day I licked the dolmen. I imagine that Schwern felt the same way. [Other articles in category /misc] permanent link Tue, 06 Feb 2024
Jehovah's Witnesses do not number the days of the week
[ 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. [Other articles in category /calendar] permanent link Sat, 16 Dec 2023
My Git pre-commit hook contained a footgun
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:
So the complete broken code was on the new branch Then I wanted to pull in the first file from Wat. I looked all around the history and couldn't find the changes. The
Eventually I looked back in my terminal history and discovered the
problem: I had a Git This time one of the files had something like that. My Fortunately the
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:
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
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, Rather than using the stash, the hook might just commit everything
(with 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:
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. AddendumI 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? [Other articles in category /prog/git] permanent link Fri, 15 Dec 2023
Recent addenda to articles 202311: Christenings in Tel Aviv
[ 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.)
[Other articles in category /addenda] permanent link Sun, 03 Dec 2023Over 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. Addenda
[Other articles in category /lang/etym] permanent link Sat, 02 Dec 2023Content warning: grumpy complaining. This was a frustrating month. Need an intuitive example for how "P is necessary for Q" means "Q⇒P"?This kind of thing comes up pretty often. Why are there so many ways that the logical expression !!Q\implies P!! can appear in natural language?
Strange, isn't it? !!Q\land P!! is much simpler: “Both !!Q!! and !!P!! are true” is pretty much it. Anyway this person wanted an intuitive example of “!!P!! is necessary for !!Q!!” I suggested:
Again this follows the principle that rule enforcement is a good thing when you are looking for intuitive examples. Keeping ticketless people off the train is something that the primate brain is wired up to do well. My first draft had “board a train” in place of “board a certain train”. One commenter complained:
I was (and am) quite disgusted by this pettifogging.
OP had only asked for an example, not some universal principle. Does ...999.999... = 0?This person is asking one of those questions that often puts Math StackExchange into the mode of insisting that the idea is completely nonsensical, when it is actually very close to perfectly mundane mathematics. (Previously: [1] [2] [3] ) That didn't happen this time, which I found very gratifying. Normally, decimal numerals have a finite integer part on the left of the decimal point, and an infinite fractional part on the right of the decimal point, as with (for example) !!\frac{13}{3} = 4.333\ldots!!. It turns out to work surprisingly well to reverse this, allowing an infinite integer part on the left and a finite fractional part on the right, for example !!\frac25 = \ldots 333.4!!. For technical reasons we usually do this in base !!p!! where !!p!! is prime; it doesn't work as well in base !!10!!. But it works well enough to use: If we have the base-10 numeral !!\ldots 9999.0!! and we add !!1!!, using the ordinary elementary-school right-to-left addition algorithm, the carry in the units place goes to the tens place as usual, then the next carry goes to the hundreds place and so on to infinity, leaving us with !!\ldots 0000.0!!, so that !!\ldots 9999.0!! can be considered a representation of the number !!-1!!, and that means we don't need negation signs. In fact this system is fundamental to the way numbers are represented in computer arithmetic. Inside the computer the integer !!-1!! is literally represented as the base-2 numeral !!11111111\;11111111\;11111111\;11111111!!, and when we add !!1!! to it the carry bit wanders off toward infinity on the left. (In the computer the numeral is finite, so we simulate infinity by just discarding the carry bit when it gets too far away.) Once you've seen this a very reasonable next question is whether you can have numbers that have an infinite sequence of digits on both sides. I think something goes wrong here — for one thing it is no longer clear how to actually do arithmetic. For the infinite-to-the-left numerals arithmetic is straightforward (elementary-school algorithms go right-to-left anyway) and for the standard infinite-to-the-right numerals we can sort of fudge it. (Try multiplying the infinite decimal for !!\sqrt 2!! by itself and see what trouble you get into. Or simpler: What's !!4.666\ldots \times 3!!?) OP's actual question was: If !!\ldots 9999.0 !! can be considered to represent !!-1!!, and if !!0.9999\ldots!! can be considered to represent !!1!!, can we add them and conclude that !!\ldots 9999.9999\ldots = 0!!? This very deserving question got a good answer from someone who was not me. This was a relief, because my shameful answer was pure shitpostery. It should have been heavily downvoted, but wasn't. The gods of Math SE karma are capricious. Why define addition with successor?Ugh, so annoying. OP had read (Bertrand Russell's explanation of) the Peano definition of addition, and did not understand it. Several people tried hard to explain, but communication was not happening. Or, perhaps, OP was more interested in having an argument than in arriving at an understanding. I lost a bit of my temper when they claimed:
I didn't say:
although I wanted to at first. The reply I did make is still not as measured as I would like, and although it leaves this point implicit, the point is still there. I did at least shut up after that. I had answered OP's question as well as I was able, and carrying on a complex discussion in the comments is almost never of value. Why is Ramanujan considered a great mathematician?This was easily my best answer of the month, but the question was deleted, so you will only be able to see it if you have enough Math SE reputation. OP asked a perfectly reasonable question: Ramanujan gets a lot of media hype for stuff like this: $${\sqrt {\phi +2}}-\phi ={\cfrac {e^{{-2\pi /5}}}{1+{\cfrac {e^{{-2\pi }}}{1+{\cfrac {e^{{-4\pi }}}{1+{\cfrac {e^{{-6\pi }}}{1+\,\cdots }}}}}}}}$$ which is not of any obvious use, so “why is it given such high regard?” OP appeared to be impugning a famous mathematician, and Math SE always responds badly to that; their heroes must not be questioned. And even worse, OP mentioned the notorious non-fact that $$1+2+3+\ldots =-\frac1{12}$$ which drives Math SE people into a frothing rage. One commenter argued:
I think this is fatuous. OP is right here, and the commenter is wrong. Mathematicians are not considered great because they produce wacky and impractical equations. They are considered great because they solve problems, invent techniques that answer previously impossible questions, and because they contribute insights into deep and complex issues. Some blockhead even said:
Bullshit. Mathematics is about trying to understand stuff, not about taping a banana to the wall. I replied:
My answer to OP elaborated on this point:
I then discussed Hardy's book on the work he did with Ramanujan and Hardy's own estimation of Ramanujan's work:
So if OP wanted a substantive and detailed answer to their question, that would be the first place to look. I also did an arXiv search for “Ramanujan” and found many recent references, including one with “applications to the Ramanujan !!τ!!-function”, and concluded:
The question was closed as “opinion-based” (a criticism that I think my answer completely demolishes) and then it was deleted. Now if someone else trying to find out why Ramanujan is held in high regard they will not be able to find my factual, substantive answer. Screw you, Math SE. This month we both sucked. [Other articles in category /math/se] permanent link Fri, 01 Dec 2023
Obsolete spellings and new ligatures in the names of famous persons
There's this technique you learn in elementary calculus called l'Hospital's rule or l'Hôpital's rule, depending on where and when you learned it. It's named for Guillaume l'Hospital or Guillaume l'Hôpital. In modern French the ‘s’ is silent before certain consonants, and sometime in the 18th century it became standard to omit it, instead putting a circumflex over the preceding vowel to show that the ‘s’ was lurking silently. You can see the same thing in many French words, where the relationship with English becomes clear if you remember that the circumflex indicates a silent letter ‘s’. For example
and of course
But the spelling change from ‘os’ to ‘ô’ didn't become common until the 18th century and l'Hôpital, who died in 1704, spelled his name the old way, as “l'Hospital”. The spelling with the circumflex is in some sense an anachronism. I've always felt a little funny about this. I suppose the old spelling looks weird to francophones but I'm not a francophone and it seems weird to me to spell it in a way that l'Hospital himself would not have recognized. For a long time I felt this way about English names also, and spelled Shakespeare's name “Shakspere”. I eventually gave up on this, because I thought it would confuse people. But I still think about the question every time I have to spell it and wonder what Shakespeare would have thought. Perhaps he would have thought nothing of it, living as he did in a time of less consistent orthography. To find out the common practice, I went to the German Wikipedia page for Karl Gauss, for whom there a similar issue arises. They spell it the modern way, “Gauß”. But now another issue intrudes: They spell it “Carl” and not “Karl”! If the name were completely modernized, wouldn't it be “Karl Gauß” and not “Carl Gauß”? Is “Carl” still a thing in German? Gauss is glowering down at me from his picture on an old ten-mark banknote I keep on my wall, so I checked just now and Deutsche Bundesbank also spells it ”Carl Gauß”. (The caption sprouts forth from his left shoulder.) Now I wonder why I checked the German Wikipedia for Gauss before checking the French Wikipedia for l'Hôpital. Pure stupidity on my part. French Wikipedia uniformly spells it the modern way, with the circumflex. I suppose I will have to change my practice, and feel the same strangeness whenever I write “Gauß” or “l'Hôpital” as I do when I write “Shakespeare”. Addenda
[Other articles in category /lang] permanent link |