Shortform Thoughts

2026-09-30 Wednesday

Indian Small Arms

Inspired by the latest Forgotten Weapons video, which covered a modified IWI Tavor X95 for Indian Army service, I decided to conduct a shallow dive into the current state of Indian Army small arms. Long story short, it's yet another example of Indian defense procurement.

In the '90s India decided to replace its aging stock of L1A1s with a new rifle. They chose an indigenous option, the INSAS (INdian Small Arms System), chambered in 5.56 x 45 mm to replace their 7.62 x 51 mm L1A1s. The project was not smooth, but by the late '90s, the first rifles were in the hands of soldiers, just in time for the Kargil War with Pakistan.

The performance of the rifle in the Kargil War was not good. Soldiers complained about polymer handguards rendered brittle and subject to cracking in cold temperatures. There were issues with the rifles going into full-auto when the soldier had selected the 3-round-burst option. Finally, soldiers complained that the new 5.56 x 45 mm ammunition was not as lethal as the old 7.62 mm ammunition.

In response to that feedback, the Indian Army created a modified 5.56 cartridge, termed the "5.56 Lethal", with a longer, heavier bullet, necessitating a magazine that was 3 mm longer than the standard NATO magazine, and revised the INSAS rifle to accommodate that round. In addition, they put out a tender request for replacements to the INSAS. The modified IWI Tavor X95 referenced above was one of the candidates considered. In addition to IWI, Colt, Beretta, Sig Sauer, and Ceska submitted candidate firearms.

Faced with a plethora of rifles submitted by some of the leading small arms manufacturers in the world, the Indian military did a very typically Indian thing, and chose none of them. Instead, they turned to the Kalashnikov concern in Russia, and sought a license to manufacture the AK-203, chambered in the old Russian 7.62 x 39 mm cartridge, rather than the newer (and by newer, I mean 1970s vintage) 5.45 x 39 mm cartridge used by modern AK-pattern rifles. I guess the Indian army really wanted something in a 7.62 mm bore, and once that bore diameter is fixed, the only viable intermediate cartridge is 7.62 x 39 mm.

But the AK-203 production also ran into obstacles. Faced with delays (including some caused by the war in Ukraine), the joint venture that India set up with Russia, had, as of 2024 delivered only 27,000 rifles, far fewer than even the initial contracted goal of approximately 70,000.

Faced with this second problem, what did the Indian military do? Did they abandon the AK-203 and return to one of the 5.56 x 45 mm candidates they'd considered earlier? No. Did they decide to make a new iteration of the INSAS? No. Instead, what they did was adopt, as an "interim" measure, yet another rifle, the SIG 716, while continuing production of the AK-203. Is the SIG 716 chambered in 7.62 x 39 mm, the bullet used by the AK-203? No. Is it chambered in 5.56 Lethal, the round used by the INSAS? Also no. The SIG is chambered for the 7.62 x 51 mm round used by the L1A1.

A running joke in Forgotten Weapons is "the Elbonia question". The question places the respondent as the defense minister of the hypothetical nation of Elbonia, with the proviso that they are a traitor, and are seeking to undermine, rather than bolster, Elbonian military readiness. Thus, the response to the question must appear like a plausible or even good idea on the surface, but in reality must lead to poor outcomes. I can hardly think of something more Elbonian than equipping one's infantry with three different rifles chambered in three different cartridges.

2025-11-21 Friday

Tariffs

It's unfortunate that tariffs that are legally defensible are defensible as policy and the tariffs that are defensible as policy are indefensible legally. To elaborate, Trump has imposed tariffs using two authorities. The first is the International Emergency Economic Powers Act, a law passed in 1977 that allows the President to declare an emergency and impose various kinds of trade barriers to address that emergency. This is the basis for Trump's "reciprocal" or country-specific tariffs. The other legal basis for tariffs is Section 232 of the Trade Expansion Act of 1962. This legal provision allows the Commerce Secretary to examine specific imports to see if they're having a deleterious impact on "national security" and to impose restrictions if they do. Section 232 is the basis for Trump's sector-specific tariff, such as those on steel, aluminum and copper products.

The problem is that the IEEPA doesn't mention tariffs at all. In fact, the IEEPA was passed in response to another President, Richard Nixon, unilaterally imposing tariffs under the Trading With the Enemy Act. Furthermore Trump's legal argument for imposing tariffs involves declaring a broad non-specific emergency regarding "trade deficits", and imposing tariffs on all imports as a result. As the questioning by the Supreme Court justices in Learning Resources v. Trump pointed out, this seems like a clear violation of the separation of powers. After all, the Constitution, in Article 1, Sections 7 and 8, gives the Congress the power to levy taxes and impose tariffs. Furthermore, given that the Court overturned Chevron v. NRDC, the Executive cannot even fall back to stating that the IEEPA is ambiguous regarding what sorts of trade restrictions may be imposed unilaterally, and therefore the Court must exercise deference to Executive judgment.

On the other hand, Section 232 tariffs are legally quite defensible. The Carter and Reagan administrations imposed tariffs on oil imports after conducting Section 232 investigations that determined that cheap oil imports were hampering domestic production, thereby putting national security at risk. This is similar to Trump's findings regarding steel and aluminum imports. As a result, there haven't been any legal challenges at all to the Section 232 tariffs, and US manufacturers have largely resigned themselves to paying higher prices for raw materials than their foreign competitors.

However, in terms of policy, the situation is reversed. Trump's stated policy goal is to use tariffs to enact trade barriers that will revitalize American manufacturing and American goods exports. The IEEPA tariffs are well suited to that, as they are broad-based and encourage the migration of entire supply chains out of tariff-affected countries and into the US (or, failing that, at least to countries that are less hostile to US interests).

In contrast, the Section 232 tariffs often increase costs for US manufacturers by imposing tariffs on specific inputs (like steel, or aluminum) whose domestic production is difficult to expand. Thus, they create a perverse incentive for manufacturers to relocate abroad, where raw materials are cheaper and more accessible.

Ultimately, this issue results from the peculiar reluctance the Trump administration has towards legislation. I have confidence that President Trump could have, if he'd desired, shepherded legislation through Congress granting him the power to impose tariffs to protect American manufacturing. He did not. Instead he chose to creatively reinterpret existing legislation, thus painting himself into a corner where his best tariff options are likely unconstitutional, while his worst tariffs are the most defensible.

2025-11-03 Monday

Intel and Boeing

Many articles bemoaning the current state of American manufacturing use Intel and Boeing as their exemplars of how once vibrant American manufacturers have been overtaken by foreign competition. However, Intel and Boeing's travails are actually, in some ways, exactly mirror images of one another, which makes it difficult to draw lessons about how to restore American manufacturing competitiveness.

Boeing is one the United States' aircraft manufacturers, and the only company in the US still making large, long-distance civilian airliners. However, lately, Boeing has had a number of stumbles. It's new long-haul 787 jetliner was beset with delays, eventually resulting in a nearly $10 billion cost overrun. The 737 Max airliner also had numerous development issues, and issues with its software were given at least partial blame for two crashes, those of Lion Air flight 610, and Ethiopian Airlines flight 302. These failures grounded the 737 Max for a number of months while Boeing implemented hardware and software fixes to ensure that similar failures would not occur in the future. A few years after that, a door plug blew out on another 737 Max, Alaska Airlines flight 1281, after it was installed without the retaining bolts needed to hold it in place.

Many outside observers linked this litany of problems to a loss of engineering culture at Boeing. According to the popular narrative, Boeing fell victim to a culture that prioritized cost cutting and outsourcing over engineering excellence. A major cause of delays and defects, both with the 787 and with the 737 Max door panel, was the outsourcing of major components of aircraft to third party suppliers, such as Spirit Aerosystems. If Boeing had kept this manufacturing in-house, the logic goes, there would have been greater communication between design, manufacturing and quality control, and defects and delays would have been caught earlier, either preventing problems entirely or allowing them to be addressed before they lead to overruns, failures and crashes. Indeed, Boeing is now in the process of reacquiring Spirit Aerosystems, in order to allow for greater supervision and control over the production of major aircraft components, such as fuselages.

Like Boeing, Intel is one of a select few companies operating at the technological forefront, in semiconductors, rather than aviation. Also like Boeing, Intel's position has slipped from being a class-leading company to being an also-ran. Intel missed the boat on mobile, ceding that space to ARM. Its efforts to design a competitive GPU have struggled, and it occupies a distant third place in that market, behind Nvidia and AMD. Most concerning of all, it has lost its lead in its core CPU market, as AMD has been able to deliver CPUs that are either competitive to or even, in some cases, better performing than Intel.

However, the problem with Intel isn't that it outsourced too much, it's that it didn't outsource enough. Intel's competitors, Nvidia, AMD, and ARM are all "fabless" companies, which have chosen to specialize into chip design, and leave the actual manufacturing to companies like Samsung, Global Foundries, and most of all, TSMC. Indeed, AMD notably spun off its fab unit as Global Foundries, enabling it to focus on chip design. While the decision was questioned at the time, especially in light of AMD's prior CEO, Jerry Sanders, saying "Real men have fabs," in hindsight the decision to split off the capital-intensive fab business and focus on chip design was a good one for AMD, giving them the cash they needed to catch up to Intel.

This is why it's problematic to club Boeing and Intel together. Is the problem too much outsourcing, and therefore a loss of integration that makes it impossible to catch small problems before they blow up? Or is the problem too much integration, preventing the company from taking advantage of process and technology improvements developed elsewhere? The Boeing and Intel cases suggest opposite answers to these questions. Ultimately, we should realize that there is no such thing as "manufacturing", abstractly defined. Businesses rise and fall due to local, company-specific problems, and we should be careful about drawing broad narratives because two major "national champions" happen to encounter difficulties at the same time.

2025-10-08 Wednesday

AI is killing the web; should anything save it?

On July 14, The Economist asked, "AI is killing the web. Can anything save it?" The article points out that content publishers are seeing dramatic declines in search-engine driven traffic as users increasingly turn to AI-generated summaries to answer their questions. This disrupts the traditional advertising-supported business model that many websites have operated under, which relies on users clicking through from search engine results in order to generate pageviews, which are then monetized by ads.

But is this a bad thing? As Ryan Holiday points out in Trust Me I'm Lying, the advertising-driven revenue streams lead online media to prioritize shallow engagement metrics to maximize page views. This leads to sites publishing high-emotional valence content in an effort to drive clicks from search engines and link aggregators. It drives sites to structure themselves to maximize page views, for example by unnecessarily splitting content across many short pages, each of which has far more advertising than information. This incentive structure is ripe for manipulation by marketers and PR professionals who can feed websites with an endless stream of outrage-bait.

Given that, maybe it's a good thing that the traditional advertising-supported business model is dying. At the end of Trust Me I'm Lying Holiday says that the existing "attention economy" is unsustainable, and that eventually something will happen that will force a change in the business model of online publishers. Maybe the AI revolution is that change.

2025-10-07 Tuesday

realpath and LLMs

I asked several LLMs the following question:

In Linux, on the command line, how do I get the full path name of a file or an error if the file does not exist?

Here are the responses:

None of the AI models performs acceptably. All of them initially claim that realpath will return an error if the file does not exist. This is not true. As the man page for realpath clearly states:

Print the resolved absolute file name; all but the last component must exist

This implies that only the containing directory must exist, not the file itself.

Although none of the AI models do well, some of them are better than others. Gemini 2.5 Pro and Claude 4.5 Sonnet seem to catch on relatively quickly when I point out the above quote from the realpath man page, and tell me that realpath has a -e flag that I can pass to get it to test the entire path for existence.

Claude 4.1 Opus seems to prefer using the Bash test function to test file existence, but does offer realpath -e as its second option.

The OpenAI models perform worst of all. ChatGPT 4o insists that there is no flag I can pass to realpath to get it to check if the entire path exists, and it insists that the only means of checking whether the file itself exists is to use test or readlink.

ChatGPT 5, confusingly, starts out like 4o. It initially insists that there is no way to make realpath test for file existence. However, after further prompting, it acknowledges that the -e flag exists, but says it's not what the user wants. However, halfway through, it changes its mind and admits in the conclusion that realpath -e is "exactly what you want". The midanswer reversal is incoherent and brings to mind the scene from 1984 where the Party functionary switches mid-sentence from speaking about war against Eurasia to war against Eastasia without any acknowledgement or admission that there was a change.

Overall I'm mystified as to how any programmer can trust LLM-generated code when it flubs basic Linux API knowledge like this. If the LLM will happily write code that allows for nonexistent files, even when it is explicitly told that the user wants an error when the file does not exist, what other basic error checks is it leaving out? Do you know? Have you checked? Or have you just tested the happy path for LLM generated code?

2025-09-10 Wednesday

Trump is more like FDR than any Democrat

https://www.ft.com/content/dfcacf73-afe0-465b-9e97-70b7e2dcf9ad

"Democrats also face a deeper philosophical problem. Nobody knows how to reinvent 20th-century liberalism. In the US that was Franklin D Roosevelt’s 1930s New Deal, with updates over the next couple of generations."

That's not true. Trump reinvented 20th-century liberalism. Let's count the ways that Trump and FDR are similar, shall we?

  • Both are upper-class sons of aristocracy, who ran against their upper-class background
  • Both used new media (radio, social media) to connect directly with their supporters, bypassing traditional media gatekeepers (newspapers, broadcast media)
  • Both favored executive action over planning and legislation. Roosevelt, of course, created the hundred-day standard by which all modern presidents are judged by creating a number of government programs, such as the Civilian Conservation Corps and the Tennessee Valley Authority. Similarly, Trump has has acted vigorously, enacting tariffs, carrying out immigration raids, calling out the National Guard, etc.
  • The policies of both were extremely scattershot, and arguably made many of the problems they were addressing worse. Economists today are split on the extent to which Roosevelt's pre-World War 2 economic policies alleviated the Great Depression. Similarly, Trump's policies on tariffs, trade and industrial policy often cancels itself out.
  • Roosevelt, like Trump, had an utter contempt for the Supreme Court; for all that Trump has inveighed against the Court, he hasn't threatened, as FDR did, to increase its size in order to guarantee a permanent majority in his favor
  • Both ran against the forcible imposition of a righteous and pious morality by a puritanical movement. Roosevelt repealed Prohibition. Trump repealed wokism.
  • Trump and FDR both enjoyed total loyalty from their respective parties
  • Trump and FDR were elected by the same coalition of farmers and industrial laborers.

The real problem for Democrats is that, right now, they're in the same position that the Republican Party was in the 1930s. They're advocating free trade, lassiez-faire economics ("just learn to code, bro") and a condescending morality that treats the working class as a benighted people to be saved rather than an interest group to be served.

2025-06-02 Monday

Russian Losses in Ukraine are Sustainable

In War on the Rocks, Collin Meisel and Mathew Burrows write, "Russia Can Afford To Take A Beating In Ukraine". Russian forces in Ukraine are suffering 400,000 casualties a year. While this sounds, and is, horrendous, they argue that it is unfortunately sustainable for Russia. Russian force replenishment has gone better than anticipated, and the Russian military is actually 15% larger today than it was at the beginning of the Ukraine conflict. They also point out that Russia still holds an advantage in artillery shell production over the West, producing 250,000 shells a month as compared to a combined US and EU production of 113,000. Finally, they point out that, although Russia has lost a substantial amount of armor in Ukraine, it is still producing approximately 100 new tanks each month, and can sustain armor losses into at least 2026.

While I agree with the overall conclusion of the piece, I do think it's overly optimistic in its assessment of Russian manpower. The estimates of Russian manpower are based on demographics, showing that Russia still has a large advantage in total numbers of military-aged males over Ukraine. But Vladimir Putin isn't conscripting soldiers. He is attempting to persuade them to go to war, via signing bonuses, hazard pay and death benefits for soldiers' families. This indicates that Putin feels constrained from arbitrarily increasing the level of Russian manpower in the war. Therefore, the level of Russian manpower isn't constrained by demography alone, but also by Russian economic performance. While Russian economic performance thus far has been better than expected, especially given the impact of Western sanctions, there is no guarantee that this overachievement will continue.

I also think that the authors have made some mistakes in their assessment of Russian armor reserves. They cite this Forbes article on Russian T-72 tanks in storage, and argue that Russia still has deep reserves of relatively modern tanks. However, as the article points out, it's likely that those tanks are still in storage because they have deteriorated too badly to be easily refurbished and sent to the front. Whether they can be fixed up with further effort and turned back into effective fighting vehicles remains to be seen, and I don't think it's fair to count those T-72s as part of Russian armor reserves.

All that said, I'm not sure how much these critiques change the conclusion. Russia does appear to be successfully sustaining its effort in Ukraine, at least for now, and seems to have enough reserves to last through the end of the year. Although the Russian military is taking devastating losses, it is not losing cohesion, and there are few reports of large scale surrenders, desertions or mutinies that would indicate an army on the brink of collapse. While the article might be overly optimistic, I do think the headline, "Russia Can Afford To Take A Beating In Ukraine," rings true.

2025-05-12 Monday

To understand Donald Trump, watch Glengarry Glen Ross

I was reading Construction Physics' article on the influence of real estate developers on modern architecture, and I realized that the key to understanding Donald Trump's mindset is to realize that he's a real estate developer. A real estate developer doesn't design buildings. He has architects and engineers for that. He doesn't finalize the little details of contracts. He has accountants and lawyers for that. His job is to get the principals in the room, sell them on a vision, and get them to sign a letter of intent to commit money towards a particular project. After that, if the project falls through, that's unfortunate, but these things happen sometimes.

Trump is like Alec Baldwin in Glengarry Glen Ross. He wants to close the deal. He wants people to "sign on the line that which is dotted". This is why Trump hails interim agreements, like the one just signed with China as final. It's why he never seems to follow up when deals go bad. As far as he's concerned, he's closed the deal. He's earned his commission. If the deal falls apart later, that's not his problem.

Unfortunately, this can be exploited. Canny adversaries can enthusiastically agree to an interim agreement which is advantageous to them, and stall during the negotiations for the final agreement.