Tuesday, September 22, 2026

The engineering behind the US Strategic Petroleum Reserve

https://johnjwang.com/post/2026/09/15/engineering-behind-us-strategic-petroleum-reserve

So how did the US solve this? The crux was using salt domes at four sites in Texas and Louisiana along the Gulf of Mexico. The US created massive caverns underground in these salt domes that hold about 10 million barrels each (more than the entire Red Hill facility). The DOE currently lists 60 caverns with a combined authorized storage capacity of about 714 million barrels.

A few properties make this work:

  • Cylindrical caverns are excavated using water. Engineers drill into a salt dome and inject fresh water. The salt dissolves in the water, and then pumps are used to remove the resulting brine, leaving a cavern that can be used to store petroleum.

  • Salt contains the oil and helps seal small fractures. The rock salt surrounding the SPR’s caverns has extremely low permeability, meaning fluids have very little ability to pass through it. It also doesn’t react with petroleum. Under enormous pressures underground, salt also slowly deforms, which helps close small fractures. The salt itself can therefore contain the oil without a steel-and-concrete tank lining the cavern.

  • Oil floats on water, which means pumping water into the bottom of the cavern pushes the oil out. As fresh water is pumped into the bottom of the cavern, the oil gets displaced upwards into a delivery system.

 

A bonus interesting comment from the discussion on Hacker News

There was a good comment on r/oil by someone who worked on the engineering for the SPR. Unfortunately it's fallen off the front page and I can't find it now, but:

> Also, the more water we pump in, the more salt leeches into the water and the more the bottom of the chamber deforms, creating shear forces in the upp walls that lower its overall structural integrity.

It turns out that it's trivially easy to prevent the water from leeching out the salt. They presaturate the water with salt, so that it already contains the maximum amount of salt that can be dissolved for a given temperature. When they pump the brine out, it goes into aboveground brine pools that can easily be seen on satellite imagery. The salinity of this brine can easily be controlled: if you want to expand the cavern, you mix it with freshwater so the brine dissolves more of the edges, if you don't you pump it back in as brine.

Edit: Here, found some satellite imagery of one of the SPR sites:

https://maps.app.goo.gl/B8XJ9TVhQfcdErky5

You can clearly see the brine pond, which is as big as the aboveground portion of the SPR itself.

 

Saturday, September 19, 2026

Reversing Factorio's RNG

https://gegell.github.io/posts/factorio-rng/

If we take a look at how the function is implemented in the game we can see that it basically just takes the RNG roll and compares it against some thresholds. It stops as soon as it finds a threshold which is no longer beaten by the roll.

This means that each craft which involves quality rolls will take exactly 1 RNG call. And for each call we can compute the expected quality level by just comparing against all the thresholds, which stay constant during the game. Thus they can be precomputed in-game with some arithmetic combinators.


Monday, September 7, 2026

216,000,000 Spy TVs | The LG Smart TV Problem

https://www.youtube.com/watch?v=6IFVTcM28KA

The LG Smart TVs we've tested have first-party ACR (automatic content recognition) functionality that can pry into your personal life with greater precision than you might realize, with LG Ad Solutions' executives and leadership saying, on camera, that LG "owns the glass." Not you -- even though you bought it -- but them. They also talk about knowing everybody in the household, knowing the secondary devices, moving from TVs to smartphones and other screens, and more in their B2B discussions. Beyond just the fact that we think the TV's native behavior parallels malware, the LG Smart TVs we tested also have a number of security vulnerabilities that can be exploited to convert the TVs into covert listening devices. In this investigation, we dive into the mix of LG's first-party functionality that (in our opinions) is tantamount to spying and LG's vulnerabilities and exploits that they have failed to protect against.