25 newsletters today.
Abandoned Futures
2026-07-17
In October 2000, on a remote test stand near McGregor, Texas, a rocket engine roared for 21 seconds and produced 3.7 million pounds of thrust. It was — and as of 2026 still is — the largest liquid rocket engine ever fired. It was not built by NASA, Boeing, or Lockheed. It was built by Beal Aerospace, a private company founded by Dallas banker Andrew Beal, funded almost entirely out of his personal fortune. Six months later, Beal shut the company down and walked away.
Beal Aerospace was founded in 1997 with a heretical premise: heavy-lift launch could be radically cheaper if you threw out the sacred cows of American rocketry. Beal's team, led by former McDonnell Douglas engineer Neal Beal (no relation) and Delta engineer Michael McKinney, made three unconventional bets:
The plan was the BA-2, a three-stage rocket capable of putting 17,000 pounds into geostationary transfer orbit — competitive with Ariane 5 and Delta IV Heavy. Beal projected launch costs of $1,000/pound to LEO, roughly one-tenth the going rate in 2000.
They actually built it. By 2000 Beal had spent about $200 million of Andrew Beal's own money, employed 200 engineers, and successfully test-fired the second-stage engine (810,000 lbf) and then the monstrous first-stage BA-2 (3.7 million lbf). Both engines worked on the first attempt — an almost unheard-of achievement in liquid rocket development.
Then, on October 23, 2000, Beal announced the company was shutting down immediately. His reason was not technical failure. It was that NASA had just announced the Space Launch Initiative, promising $4.5 billion in subsidies to Boeing and Lockheed to develop next-generation reusable launchers. Beal wrote in his shutdown statement: "There will always be too much subsidized competition from NASA for a private launch business to make sense."
Why revisit this now? Everything Beal bet on has been vindicated. SpaceX proved private heavy-lift is viable. Rocket Lab's Neutron and Stoke Space are pursuing pressure-fed and simplified engine cycles. Composite tanks are now standard. Hypergolic propellants are back in vogue for tactical launch. And the "no subsidy needed" argument became the founding thesis of the entire New Space industry — five years before SpaceX won its first NASA contract.
The BA-2 test stand at McGregor was purchased by SpaceX in 2003 and became the test site where the Merlin engine was developed. The largest liquid rocket engine ever fired sits in pieces in a warehouse. Rebuilt with modern additive manufacturing and composite tankage, a pressure-fed BA-2-class booster could put payloads into orbit today for costs SpaceX still hasn't matched on expendable flights.
ArXiv Paper Digest
2026-07-17
Imagine you hire a new junior developer. On their first day, you hand them a README and say "get the project running." They dutifully follow every instruction: install these packages, run this Makefile, pull this dependency. They don't question whether the packages are real, whether the registry is trustworthy, or whether the version has known vulnerabilities — they just follow orders. Now imagine that junior developer is an AI coding agent doing this thousands of times a day, on thousands of projects.
That's the attack surface this paper systematically exposes. The authors show that an attacker doesn't need to touch actual source code to compromise a project handled by an AI coding agent. All they need is to edit a README, requirements.txt, or Makefile — the "setup" instructions the agent reads before writing a single line of code.
The attacks fall into three flavors:
The clever insight here is that AI coding agents fundamentally trust documentation as ground truth. Human developers have gut instincts — "wait, why is this pointing to a weird registry?" — built from years of getting burned. Agents have no such intuition. They treat a Markdown instruction with the same authority as a signed release. Documentation, in other words, has become executable code, but nobody is treating it that way from a security standpoint.
The paper's evaluation shows this isn't theoretical: mainstream agents fall for these attacks at high rates, and the payload is trivially small — sometimes a single edited line in a README. Worse, these repositories look completely normal to a human reviewer, because the malicious behavior only manifests when an agent processes the setup instructions.
The authors argue the fix requires agents to treat setup-time instructions as untrusted input: verify package names against known-good registries, check versions against vulnerability databases, and flag redirects to non-standard sources. Essentially, the same skepticism a security-conscious human would apply — but currently absent from the agents shipping to millions of developers.
Daily Automotive Engines
2026-07-17
You've spent hours getting the multi-angle valve job perfect and radiusing the seat into a smooth curve. Now comes the step that ties the whole cylinder head together: blending the bowl into the seat. This is where the port's bowl area meets the machined valve seat, and it's arguably the single highest-payoff square inch in the entire head.
The bowl is the enlarged chamber directly under the valve, and the seat is the precision-machined ring the valve closes against. Between them lies a transition zone — typically 0.100" to 0.200" wide — where the cast bowl surface meets the machined seat metal. If left alone, you get a visible step or shoulder where the two surfaces mismatch by anywhere from 0.010" to 0.040". Air hitting that step at 300+ feet per second doesn't gracefully turn — it separates, forms a vortex, and dumps 15-25% of your potential flow.
The blend fixes this by carving a smooth, continuous radius from the bowl wall into the top angle of the valve job. Done right, a probe run from the bowl into the seat feels like glass — no ledge, no ridge, no abrupt diameter change. The airflow stays attached to the wall all the way to the valve curtain.
Real-world example: Small-block Chevy 23-degree heads are notorious for a mismatched bowl-to-seat transition from the factory. A stock 195cc head might flow 235 CFM at 0.500" lift. Spend 20 minutes per port blending the bowl into a 60-degree top cut with a carbide burr and cartridge roll, and the same head measures 258 CFM — a 10% gain from removing a step you could barely see with the naked eye.
Rule of thumb: The blend radius should be roughly 1.5× the width of the top angle of the valve job. If your top cut is 0.080" wide at 60 degrees, your blend radius should be about 0.120". Tighter and you leave a subtle ledge; looser and you cut into the seat's structural width, risking recession under valve-hammer loads.
Two hazards to watch: never blend into the seat's 45-degree contact face (that's the sealing surface, not a flow path), and keep the blend concentric with the valve stem centerline. An off-center blend creates asymmetric flow, and one side of the valve curtain flows more than the other — killing swirl balance and combustion consistency.
Daily Debugging Puzzle
unwrap_or Eager Evaluation Trap: The Fallback That Runs on Every Cache Hit2026-07-17
This function is supposed to look up a name's ID in a cache, mint a fresh ID on first sight, and reuse the cached value on subsequent lookups. The returned IDs are correct in every test — but production keeps burning through the ID space three times faster than it should.
use std::collections::HashMap;
use std::sync::atomic::{AtomicU64, Ordering};
static NEXT_ID: AtomicU64 = AtomicU64::new(1);
fn allocate_id() -> u64 {
NEXT_ID.fetch_add(1, Ordering::SeqCst)
}
// Look up a name's ID. Mint a fresh one on first sight,
// otherwise return the cached value.
fn resolve(cache: &mut HashMap<String, u64>, name: &str) -> u64 {
let id = cache.get(name).copied().unwrap_or(allocate_id());
cache.entry(name.to_string()).or_insert(id);
id
}
fn main() {
let mut cache = HashMap::new();
println!("{}", resolve(&mut cache, "alice")); // 1
println!("{}", resolve(&mut cache, "bob")); // 2
println!("{}", resolve(&mut cache, "alice")); // 1
println!("counter: {}", NEXT_ID.load(Ordering::SeqCst)); // 4
}
unwrap_or is a function, not a control-flow construct. Rust evaluates its argument at the call site, before unwrap_or decides what to return. Every call to resolve — including cache hits — calls allocate_id(), burns an ID, and throws the result away.
Trace the third call, resolve(cache, "alice"):
cache.get("alice") returns Some(&1). Good.unwrap_or executes, its argument evaluates: allocate_id() increments NEXT_ID from 3 to 4 and returns 3.unwrap_or(3) looks at Some(1), ignores the 3, and returns 1.The returned ID is correct — but the counter has silently advanced. Any test that asserts on the return value passes. The bug only surfaces as ID gaps, exhausted quotas, extra database writes, or duplicate analytics events, depending on what allocate_id actually does.
It's especially misleading because Rust's closure-based combinators — .map, .and_then, .or_else — are lazy. That teaches the wrong intuition: "combinators on Option only run when relevant." unwrap_or takes a value, not a closure, so the "when relevant" part doesn't apply.
Use unwrap_or_else, which takes a closure that runs only on None:
let id = cache.get(name).copied().unwrap_or_else(allocate_id);
Same trap lurks in unwrap_or(vec![]) (allocates every call), unwrap_or(config.default.clone()) (clones every call), and Result::unwrap_or(load_from_disk()) (does I/O on the happy path). If the borrow checker pushes you toward a .clone() to satisfy unwrap_or, that's a signal to switch: move the clone into an unwrap_or_else closure and the clone only fires when needed.
The naming convention is the tell. Across std, the _else and _with suffixes — or_insert_with, get_or_insert_with, ok_or_else, map_or_else — all mean "closure, evaluated lazily." Reach for those any time the fallback is a computation rather than a literal. For the specific case of "fallback is T::default()," unwrap_or_default is lazy too.
unwrap_or takes a value and evaluates its argument eagerly on every call — reach for unwrap_or_else (or any _with/_else combinator) whenever the fallback is a function call, allocation, or clone.
Daily Digital Circuits
2026-07-17
You want the density of DRAM (one transistor + one capacitor per bit) but the simplicity of SRAM (no refresh, no row/column multiplexing, no complex controller). PSRAM gives you both by hiding a DRAM array behind an SRAM-compatible interface, with a built-in refresh controller that runs in the background.
The physical cell is pure DRAM: a single access transistor gating a storage capacitor of ~25 fF. That capacitor leaks charge — mostly through the access transistor's sub-threshold current — and forgets its value in about 64 ms at room temperature. Real DRAM makes your CPU's memory controller issue refresh commands to every row every 64 ms. PSRAM buries that job inside the chip.
The trick is an internal refresh timer plus a small arbiter. Every ~15 µs the chip needs to sneak in a refresh cycle. If no external access is happening, it just does it. If you request a read exactly when refresh is scheduled, the arbiter delays your access by one refresh period (~70 ns typical) — this shows up as a tCEM (chip enable maximum) spec that limits how long you can hold CE low without releasing the bus so refresh can happen.
Real-world example: The ESP32-S3 has 8 MB of octal PSRAM in-package running at 80 MHz over a Quad-SPI or Octal-SPI interface. Firmware treats it as flat, byte-addressable memory — malloc() just works. The PSRAM controller in the SoC handles the SPI protocol; the PSRAM chip itself handles refresh. You get 8 MB of heap for pennies of silicon, at the cost of ~20× longer access latency than on-chip SRAM.
Rule of thumb: DRAM cell area ≈ 6 F² (F = feature size). SRAM cell area ≈ 120 F². PSRAM inherits DRAM's 20× density advantage — for a 180 nm process, that's ~0.2 µm² per bit vs ~4 µm² for SRAM. An 8 Mb PSRAM die fits in ~2 mm² of core area; the equivalent SRAM would need ~40 mm².
The catch: PSRAM can't guarantee zero-latency access at all times. The tCEM spec (typically 4–8 µs on serial PSRAM) means you can't do infinitely long burst transfers — the chip needs a gap to refresh. Hard-real-time code has to budget for the occasional refresh stall, or use true SRAM for latency-critical paths.
Daily Electrical Circuits
2026-07-17
Modern SoCs, FPGAs, and DDR memory don't tolerate sloppy power-up. An FPGA might demand its 1.0V core rail up before the 1.8V auxiliary, with the 3.3V I/O last — and reverse order on shutdown. Violate the sequence and you can latch up internal ESD diodes, forward-bias parasitic BJTs in the substrate, or draw destructive currents through unpowered I/O pins. Power sequencing is how you enforce the order.
There are three common approaches:
Two timing modes matter: sequential (rail B waits for rail A to reach its PG threshold) and ratiometric (all rails ramp together, reaching final value simultaneously). Xilinx FPGAs typically allow either, but DDR3/4 memory explicitly requires sequential — VDD before VTT, with VTT tracking at exactly VDD/2.
Concrete example: A Zynq-7000 board needs VCCINT (1.0V) up first, then VCCAUX (1.8V) within 30ms, then VCCO (3.3V). Using cascaded PG→EN, you tie the 1.0V buck's PG pin to the 1.8V LDO's EN, and its PG pin to the 3.3V regulator's EN. Add a 10kΩ pull-down on each EN so a floating PG (during initial power-up) keeps downstream rails off.
Rule of thumb for RC delays on EN pins: if EN's logic threshold is ~1.2V and you're pulling up to 3.3V, delay t ≈ RC × ln(3.3/(3.3−1.2)) ≈ 0.45·RC. For a 10ms delay, pick R = 100kΩ, C = 0.22µF. Verify with a scope — datasheet EN thresholds vary ±20%.
Watch for back-driving through I/O pins: if the 3.3V rail is powered but the 1.0V core is not, GPIO ESD diodes conduct from I/O into the unpowered rail, potentially latching up the chip. This is why shutdown sequence matters as much as startup — kill I/O rails before core rails.
Daily Engineering Lesson
2026-07-17
At DC and low frequencies, current flows uniformly through a conductor's cross-section. Above a few kHz, it doesn't. The skin effect pushes current toward the outer surface of the wire, and the proximity effect from adjacent conductors distorts the current distribution further. The result: most of a solid wire's copper sits idle while the outer skin overheats. Effective resistance climbs dramatically with frequency.
Litz wire (from German Litzendraht, "braided wire") solves this by replacing one thick conductor with many thin, individually enameled strands, transposed so every strand spends equal time at every radial position in the bundle. Each strand is thin enough that skin effect within it is negligible, and the transposition averages out the proximity effect so all strands share current equally.
Where you'll find it:
The rule of thumb — skin depth: the depth at which current density drops to 1/e (≈37%) of the surface value. For copper:
δ (mm) ≈ 66 / √f(Hz)
So at 100 kHz, δ ≈ 0.21 mm. Any strand thicker than about 2δ (~0.4 mm, roughly AWG 26) is wasting copper. At 1 MHz, δ ≈ 0.066 mm — you need AWG 40 strands or finer. This is why Litz specs read like "660/44" (660 strands of AWG 44 wire): the strand count sets the current capacity, and the strand gauge is chosen to be thinner than 2× skin depth at the operating frequency.
Design gotchas: Litz only helps if the transposition is real. Simply twisting bundled strands doesn't transpose them — you need a proper served or braided construction where each strand cycles through every position. Poorly-made Litz can be worse than solid wire because the enamel adds insulation losses without averaging the current. Also, Litz loses its advantage above ~2–3 MHz, where the strand-to-strand capacitance starts to dominate and you switch to alternatives like copper foil or tubing.
Termination is a pain: every one of those hundreds of strands must make electrical contact. Standard practice is to strip the ends with a solvent bath (or heated solder pot) to remove the enamel, then tin all strands simultaneously.
Forgotten Darkroom
2026-07-17
Book: CIA Reading Room cia-rdp78b05171a000500010015-8: (UNTITLED) by CIA Reading Room (1969)
Read it: Internet Archive
Buried inside a December 1969 draft memo from the National Photographic Interpretation Center (NPIC) — the CIA's spy-satellite image analysis shop — is a four-point program that reads like a modern-day pitch deck for a computer vision startup. The document lays out a five-year R&D plan whose objectives are described with startling clarity:
a. To insure Center capacity to efficiently handle, process, copy, store and retrieve imagery materials both for present and future systems.
b. To find ways to make the imagery interpretation process more efficient, less costly and speedier without avoiding drugery and tedium.
c. To develop equipment procedures to extract maximum detail from imagery.
d. To preform the necessary investigations to push state-of-the-art in fields directly related to imagery exploitation and procedures.
The typos are the giveaway that this is a raw draft — "drugery" for drudgery, "preform" for perform. But strip the typos away and you have, in four bullet points, the exact business plan of a dozen 21st-century startups: Planet Labs, Orbital Insight, Descartes Labs, Palantir's Foundry. All of them promise to store, retrieve, and interpret satellite imagery at scale, extracting "maximum detail" faster than a human analyst ever could.
Who was writing this? NPIC was a joint CIA/DIA facility founded in 1961 to interpret imagery from the U-2, SR-71, and the Corona spy satellite program. By 1969 they were drowning. Corona had returned millions of feet of film. The mention of "new systems such as the [redacted]" almost certainly refers to KH-9 HEXAGON or the earliest concepts of KH-11 KENNEN — the first digital electro-optical satellite, which would launch in 1976 and effectively invent real-time orbital imaging.
Was this prescient? Extraordinarily so. In 1969, "computer vision" as a discipline barely existed — Larry Roberts' MIT PhD thesis on 3D object recognition was only six years old, and the term "artificial intelligence" was still fighting for legitimacy. Yet NPIC was already framing the problem correctly: the bottleneck wasn't collection, it was interpretation. Humans could not scale. The classified R&D dollars that flowed from documents like this one funded early work on automated change detection, digital image enhancement, and pattern recognition — the direct ancestors of the CNNs that today flag new construction at North Korean missile sites within minutes.
Note especially objective (b): make it faster and cheaper without avoiding drudgery. Read that as a Freudian slip. What NPIC actually wanted — and what took another 45 years to arrive — was to eliminate the drudgery entirely. When a modern analyst opens a Palantir dashboard and sees pre-flagged anomalies overlaid on a fresh satellite pass, they are living inside the future this memo tried to summon.
The other quiet tell: point (a) lists storage and retrieval as a first-class problem, alongside interpretation. In 1969, that meant miles of film canisters in climate-controlled vaults. Today it means petabyte object stores. The problem never changed. Only the medium did.
Forgotten Patent
2026-07-17
In August 1926, a young assistant professor at Tohoku Imperial University in Sendai, Japan — Shintaro Uda — noticed that a row of parallel metal rods, spaced at specific fractions of a wavelength, could squeeze radio waves into a tight, forward-pointing beam. His supervisor, Hidetsugu Yagi, translated the work into English, promoted it internationally, and filed patents in Japan (JP 69115), the UK, and the United States. The U.S. patent, US 1,860,123, was filed September 3, 1926 and granted May 24, 1932, titled "Variable Directional Electric Wave Generating Device."
The invention is beautifully simple. A single "driven" dipole is connected to the transmitter. In front of it sit one or more slightly shorter "director" rods; behind it, a slightly longer "reflector." Nothing is wired to these parasitic elements — they just float in space. The passing wave induces currents in them, and those currents re-radiate with phase shifts that add constructively in one direction and cancel in the other. The result is a cheap, passive antenna with astonishing forward gain, made from what looks like a fish skeleton.
Japan's telecom establishment showed almost no interest. Yagi presented the work at conferences in the U.S. and Europe, where the British and Americans understood immediately what they were looking at. By the mid-1930s, Yagi arrays were being built into experimental radar sets in the UK and Germany.
The most famous moment in the antenna's history came in February 1942, when Japanese forces overran Singapore and captured British radar equipment along with a technical notebook. The notes kept referring to a "Yagi array." A captured British technician was interrogated, and — according to the story that became legend inside Japanese engineering — he expressed astonishment that Japanese officers didn't recognize the name of their own countryman. Japan had been fighting a radar war using an antenna it had invented and forgotten.
The Yagi-Uda design turned out to be one of the most durable inventions of the 20th century. It scales cleanly with frequency, works from HF to millimeter-wave, needs no active components, and can be built by anyone with a tape measure and a hacksaw. That's why you still see it:
Could it be built better now? In some sense, it already has been: modern electromagnetic solvers (HFSS, NEC-4) let engineers tune element spacing to fractional-millimeter precision, and printed Quasi-Yagi variants are etched directly onto PCBs for 5G mmWave beamforming modules. But the topology — driven dipole, one reflector, N directors — is exactly what Uda drew on his notebook page a hundred years ago this fall.
Daily GitHub Zero Stars
2026-07-17
Language: TypeScript
ultra-light-js is exactly what its name suggests: a minimal, reactive JavaScript framework for building modern web apps, written in TypeScript with zero dependencies. In a landscape dominated by React, Vue, and Svelte — each dragging along megabytes of tooling and a mandatory build pipeline — this project takes a refreshingly stripped-back stance.
While the repo is early-stage and light on documentation, the pitch is clear: give developers a reactive primitive-based framework that fits in a browser tab without a bundler, a compiler, or a node_modules folder the size of a small planet. That approach puts it in interesting company alongside libraries like Alpine.js, Solid, and Petite Vue — micro-frameworks aimed at the "just enough reactivity" niche.
What makes it worth a look:
Who would benefit? Hobbyists building tiny widgets or embeddables where React would be overkill. Educators wanting a readable reference implementation of reactivity. Developers curious about framework internals who want to fork something small and hackable. And anyone building for constrained environments — kiosks, embedded browsers, or bandwidth-sensitive contexts — where every kilobyte matters.
It's a zero-star repo today, but micro-frameworks in this space have a habit of attracting small, passionate followings. Worth watching, worth cloning, and worth reading the source of.
Daily Hardware Architecture
2026-07-17
Intel's TSX (Transactional Synchronization Extensions) lets a core execute a block of memory operations speculatively as a transaction — if nothing conflicts, the transaction commits atomically; if anything goes wrong, the CPU aborts and rewinds. The interesting hardware isn't the fast path. It's the abort handler: the machinery that has to undo every side effect of a transaction that might have executed hundreds of instructions before failing.
When a core enters an XBEGIN, it takes an internal checkpoint of architectural state — general registers, RIP, flags, FS/GS bases — and starts marking every cache line the transaction reads or writes with a special transactional bit in the L1 cache tag array. Reads mark the line as read-set; writes mark it as write-set and keep the modified data only in L1, hidden from the coherence protocol.
An abort fires when any of several conditions hit:
The abort handler then does three things in hardware: invalidate every write-set line in L1 (they never became globally visible), clear the transactional bits from the read-set, and restore the register checkpoint, jumping RIP to the fallback address encoded in the XBEGIN. All of this happens in tens of cycles — the CPU never had to spill anything to memory because the modified data never left L1.
Real-world example: glibc's pthread_mutex_lock with PTHREAD_MUTEX_ELISION uses TSX to attempt lock elision. A thread enters a transaction, reads the lock word (marks it as read-set) but doesn't write it, then executes the critical section. If no other thread touches the lock or the data, the transaction commits and the lock was never actually taken. If any other thread writes the lock word, the snoop hits the read-set and every eliding thread aborts back to the real acquire path.
Rule of thumb: keep transactional regions under about 4 KB of touched data and ~200 instructions. Beyond that, capacity aborts and timer interrupts dominate, and your abort rate exceeds 50% — at which point TSX becomes pure overhead compared to a normal lock.
Hacker News Deep Cuts
2026-07-17
Link: https://dl.acm.org/doi/10.1145/3674642
HN Discussion: 1 points, 0 comments
This is an ACM-published paper (ICFP 2024, based on the DOI) describing Jane Street's ongoing work to graft Rust-style memory management onto OCaml — without breaking the language's existing semantics or ecosystem. The title's "modal" is the key technical hook: rather than introducing a full borrow checker or affine type system as separate machinery, the authors extend OCaml's type system with modes — orthogonal annotations layered on top of existing types that track properties like uniqueness, locality (stack vs. heap), and linearity.
Why this matters for a technical audience:
The paper is also a good read for anyone thinking about language evolution more broadly. Adding a feature this fundamental to a mature language is usually a decade-long saga (see: Python's type hints, Java's value types). OCaml's willingness to experiment here — and Jane Street's willingness to fork and upstream — is a case study in how industrial users can drive research-grade language design.
The fact that this sits at 1 point with zero comments is a shame. It's exactly the kind of PL-research-meets-production-engineering content that HN's audience usually devours when it surfaces.
HN Jobs Teardown
2026-07-17
Source: HN Who is Hiring
Posted by: stuartposin
XCLAIM is hiring three full-stack engineers in Los Angeles to disrupt a market almost nobody talks about at parties: bankruptcy claims trading. The posting is only a few sentences long, but every word is doing work.
Their stack is Ruby on Rails + GraphQL + React/Redux with TypeScript. This is a very deliberate choice for a pre-production fintech:
Three signals jump out:
Daily Low-Level Programming
2026-07-17
Every time your fast-path reader executes a memory barrier, you pay ~20-50 cycles for a fence that almost never matters — it's only there so the rare writer can synchronize with you. The membarrier() syscall inverts this cost: readers execute zero barriers, and the writer pays a much bigger cost (a syscall + IPI to every core) to force all other cores to barrier at once.
The magic command is MEMBARRIER_CMD_PRIVATE_EXPEDITED. When the writer calls it, the kernel sends an IPI to every CPU currently running a thread of your process. Each targeted core executes a full memory barrier before returning from the IPI. When the syscall returns, you have a guarantee: every reader thread has, at some point after the writer's store, executed a full barrier — so any subsequent load it does will see the writer's store.
Real-world example: LTTng's userspace tracer. Trace-point sites are hot — millions of hits per second across cores. Each site checks an "enabled" flag with a plain load. When you flip the flag off and want to free the ring buffer, you need every reader to have observed the disable before you free. Without membarrier(), each read would need smp_rmb() to pair with your writer's smp_wmb() — burning 20-40 cycles on every trace point when tracing is off. With membarrier(), the reader is a naked load; the disabler calls membarrier(MEMBARRIER_CMD_PRIVATE_EXPEDITED) once, then safely frees.
The math: Say you have a hot path hit 10^9 times/sec across 16 cores, with a config update once per minute. Symmetric barriers cost roughly:
Rule of thumb: use membarrier() when the read:write ratio exceeds ~1000:1 and readers are on a latency-sensitive path.
Variants worth knowing:
MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE — also serializes the instruction stream (needed for JITs patching code)MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ — pairs with rseq() critical sectionsMEMBARRIER_CMD_GLOBAL — non-expedited; waits for a scheduler tick rather than IPIing (cheaper for the caller, slower to complete)Registration required: before using expedited variants, you must call membarrier(MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED). This tells the kernel your process opted in, so it knows which IPIs to send when other processes call it. Skipping registration returns EPERM.
membarrier() lets a rare writer force all reader cores to barrier via IPI, so hot-path readers can use plain loads and pay nothing for synchronization they'd almost never actually need.
RFC Deep Dive
2026-07-17
Every time you hand out [email protected] to a website so you can filter (or later identify) who sold your address, you are using a convention that RFC 5233 formalized. It is a small, three-page standards-track document that quietly shaped how millions of people manage their inboxes.
The problem. An email address is traditionally a single opaque token: local@domain. If you wanted per-purpose addresses, you either registered dozens of aliases with your mail provider or ran your own server with wildcard rules. There was no interoperable way to say "the part after the + is a user-controlled tag, and my Sieve filter should be able to match on it."
What Sieve is. Sieve (RFC 5228) is a domain-specific language for server-side mail filtering. Unlike procmail, it is deliberately not Turing complete — no loops, no shell execution — so untrusted users can safely upload filter scripts to a shared IMAP server. Sieve is extended through named capabilities, and RFC 5233 registers one called subaddress.
What the extension actually does. It adds two match-part qualifiers, :user and :detail, that any address test can apply. Given a header like To: [email protected]:
:user matches just ken:detail matches just sieve-users:localpart (from base Sieve) still matches the whole ken+sieve-users:domain matches example.orgSo a filter can now say "if the detail portion is netflix, file into the Streaming folder" without hand-parsing the local-part.
Key design decisions. The RFC is careful about several things that seem obvious in retrospect:
+ is common but explicitly refuses to mandate it. Some sites use -, some use =. This matters because RFC 5321 already reserves + as a valid local-part character with no defined semantics — Sieve just gives it optional semantics.[email protected] has a zero-length detail; [email protected] has no detail at all. The :detail test distinguishes them, which turns out to matter for security rules ("reject if detail is present but empty").:detail with :matches, :contains, and comparators, so you get glob matching on tags for free.:detail tests behave as if the header value is absent — not as an error — so scripts stay robust.Why it matters today. Gmail popularized +-addressing for consumers, but the server-side story is Sieve. Fastmail, Cyrus, Dovecot's Pigeonhole, and most modern IMAP stacks implement RFC 5233 verbatim. If you have ever written a filter rule that keys off the tag portion of an address, or built a signup tracker that gives every service a unique subaddress, this three-page RFC is why the plumbing exists. It is also a nice case study in minimum viable standardization: it does not invent the convention, it does not force a delimiter, it just gives filter authors two extra verbs and gets out of the way.
Historical note. Murchison was deep in the Cyrus IMAP world at CMU, and the extension formalizes what Cyrus already did in the wild for years. Much of Sieve's ecosystem — Sieve itself (RFC 3028, then 5228), ManageSieve (RFC 5804), and this extension — traces back to that Cyrus lineage, which is why so many mail servers speak it identically.
you+tag@domain addresses are a usable, portable filtering primitive instead of a per-provider hack.
Stack Overflow Unanswered
2026-07-17
Stack Overflow: View Question
Tags: c++, multithreading, qt, operating-system, producer-consumer
Score: 0 | Views: 155
The asker has built a QIODevice wrapper around a background producer thread. The producer pulls data from an upstream source into a circular buffer; the consumer (the GUI thread) reads from it via the standard Qt API. To make seek() cheap without re-reading, they maintain a secondary circular index of buffer offsets, and they want the whole seek path to be lock-free.
Why it's harder than a textbook SPSC queue. A classic single-producer/single-consumer ring buffer is lock-free because there is exactly one writer of head and one writer of tail. Seeking breaks that clean split: the consumer wants to reposition its read cursor to an offset that may be anywhere inside the buffer, and it must simultaneously validate that (a) the offset is still resident (the producer hasn't overwritten it) and (b) the sub-index it consulted describes the buffer as it stands right now. Between reading the index and moving the cursor, the producer can advance head and invalidate everything.
A workable direction. Treat the problem as a versioned snapshot rather than a lock. Roughly:
memory_order_release after every append. The consumer's read cursor is expressed in the same absolute coordinate space, not as a wrapped index.(absolute_offset, metadata) entries — also written by the producer and published with release semantics. The consumer scans it lazily.acquire; (2) compute the tail boundary (write_counter - buffer_capacity); (3) look up the target in the sub-index; (4) attempt to install the new read cursor with a compare_exchange, retrying if the tail has advanced past the target in the meantime. If the target has fallen out of the window, fail the seek and let the caller re-request from source.Gotchas. ABA on the sub-index itself is real — reusing slots without a generation counter will let a stale entry look valid. QIODevice is fundamentally synchronous, so a seek that races with overwrite has to have a defined failure mode; silently returning stale bytes is worse than returning an error. Also watch for torn reads on 64-bit counters on 32-bit platforms — use std::atomic<uint64_t>, not a plain member. Finally, Qt signals across threads are queued, so any "buffer advanced" notification the consumer relies on is inherently stale by the time it's processed — the atomic counter must be the source of truth, not the signal.
Daily Software Engineering
2026-07-17
Classic CLOCK gives you LRU-ish behavior at hardware speed: a circular buffer of entries, each with a single reference bit. On access, set the bit to 1. On eviction, the hand sweeps forward, clearing bits it finds set and evicting the first entry it finds with a 0. Cheap, lock-friendly, decent hit rates. But that single bit is binary — an entry hit once looks identical to one hit ten thousand times.
GCLOCK (Generalized CLOCK) replaces the reference bit with a small counter, typically 2-8 bits. On access, increment the counter (usually saturating at the max). On eviction, the hand decrements each counter it passes; only entries at zero are evicted. Hot entries survive multiple sweeps of the hand — they've built up "credit" that must be spent before they're vulnerable.
Why it beats plain CLOCK: in workloads with skewed access (a few hot keys, many cold ones), CLOCK evicts hot entries during scans because its bit tops out at 1. GCLOCK's counter preserves the frequency signal that CLOCK throws away, giving hit rates closer to LFU while keeping CLOCK's O(1) amortized cost and lock-friendliness.
Real-world example: PostgreSQL's buffer manager uses a GCLOCK variant. Each buffer has a usage_count capped at 5. When a backend needs a free buffer, the clock sweep decrements usage_count on each pinned-then-released buffer; only when it hits 0 is the buffer eligible for eviction. A frequently-touched index root page can survive five full sweeps before it's even a candidate — critical for keeping hot metadata resident under scan-heavy workloads like nightly analytics reports scanning cold tables.
Rule of thumb for counter width: use log₂(expected sweep-to-access ratio for hot items) + 1 bits. If your hottest keys get touched ~100× between sweeps, you'd want ~7 bits. In practice, 2-3 bits is the sweet spot — enough to distinguish hot from warm, small enough that decrementing on sweep still ages entries in reasonable time. PostgreSQL's cap of 5 (needs 3 bits) reflects decades of tuning.
The trade-off: GCLOCK spends more work per eviction than CLOCK. The sweep may pass over the same entry many times before finding a victim. Under memory pressure with mostly-hot entries, eviction latency can spike as the hand grinds down counters. Mitigations: cap the counter increment (don't let one page hit +1000), or bound the sweep length and fall back to random eviction if the hand travels too far.
If you're building a cache and CLOCK's simple bit isn't preserving enough frequency information, GCLOCK is usually the next step before jumping to something like TinyLFU.
Tool Nobody Knows
dd2026-07-17
Every few weeks somebody posts dd if=/dev/zero of=test bs=1M count=4096 and declares an NVMe drive good or bad. That command measures almost nothing you care about: it's sequential, single-threaded, buffered through the page cache, zeros compress on some devices, and it reports one number (bandwidth) when the interesting ones are p99 latency and IOPS under contention.
fio — the Flexible I/O Tester — is what Jens Axboe wrote because he was tired of it. Yes, that Jens Axboe: the guy who maintains the Linux block layer and wrote io_uring. His benchmark tool has been the industry standard for filesystem, block, and SAN qualification for fifteen years and most application developers have never heard of it.
The killer feature is the ioengine abstraction. fio doesn't just call read() in a loop — it can drive real workloads through libaio, io_uring, posixaio, mmap, splice, SG_IO to raw SCSI, or a network target:
# The lie: dd says my NVMe does 3.2 GB/s. What can it actually do?
fio --name=nvme-truth \
--ioengine=io_uring --direct=1 --iodepth=64 --numjobs=4 \
--rw=randread --bs=4k --size=4G --runtime=60 \
--time_based --group_reporting --randrepeat=0
You get back IOPS, bandwidth, and full latency histograms — p50/p95/p99/p99.9/p99.99 — for both submission and completion. --direct=1 bypasses the page cache so you're measuring the device, not RAM. --randrepeat=0 re-seeds the RNG so a smart controller can't cache your access pattern.
The real strength shows up in job files. Mixed workloads that mimic actual databases:
# pg-like.fio — 70/30 read/write, 16k blocks, fsync every 32 writes
[global]
ioengine=io_uring
direct=1
runtime=300
time_based
group_reporting
[reader]
rw=randread
bs=16k
iodepth=32
numjobs=8
rate_iops=20000
[writer]
rw=randwrite
bs=16k
iodepth=8
numjobs=2
fsync=32
Run it: fio pg-like.fio. Change rate_iops to cap traffic and see how latency degrades under a known load — the shape of the latency curve as you approach saturation is what actually matters for capacity planning, not the peak number.
A few things fio does that nobody else in this space does well:
fio --server on twenty machines, fio --client=hosts.txt job.fio from one — coordinated, aggregated output. This is how you benchmark a Ceph cluster.verify=crc32c writes known patterns and reads them back. Silent corruption on cheap SSDs? fio will find it.read_iolog= takes a blktrace capture from production and replays the exact I/O pattern against your test rig.log_hist_msec=1000 emits per-second histograms you can feed straight to hdrhistogram or ttyplot.Compared to alternatives: hdparm -tT measures the cache, bonnie++ has a fixed workload from 1996, iozone works but its output looks like a fax from 1998, and ioping (covered previously) is the right tool for latency probing — not throughput characterization. fio is the one you reach for when someone hands you a mystery LUN and asks "is this fast enough?"
Install: it's just apt install fio or dnf install fio. No dependencies worth mentioning. The manpage is genuinely one of the best-written in the Unix world — read HOWTO.rst in the source tree if you want an education in what modern block I/O actually looks like.
dd answers a question you didn't ask; fio answers the ones you actually need — IOPS, latency percentiles, and behavior under realistic parallel workloads, straight from the man who maintains Linux's block layer.
What If Engineering
2026-07-17
NASA's Glenn Zero Gravity Research Facility gives you 5.18 seconds of free fall down a 132-meter shaft. ESA's ZARM tower in Bremen manages 9.3 seconds with a catapult trick. Both are limited by height. What if we scaled up — a full 1-kilometer evacuated drop tower, taller than the Burj Khalifa, dedicated to microgravity science?
The free-fall time. Using t = √(2h/g), a 1000 m drop gives t = √(2000/9.81) ≈ 14.3 s. Add a catapult launch (fling the capsule up first, let it arc back), and you double it to ~28 seconds. That's triple ZARM and roughly matches what a parabolic-flight aircraft delivers in one arc — but with true 10⁻⁶ g quality, not the 10⁻² g "vomit comet" jitter.
Why the vacuum matters. Terminal velocity of a 500 kg capsule (2 m² frontal area, C_d ≈ 1) in air is v_t = √(2mg/ρAC_d) ≈ 70 m/s. The capsule would hit that in ~7 seconds and stop accelerating — no more free fall. Pumping the tower down to 10 Pa (0.0001 atm) reduces drag by 10,000×, restoring near-perfect g < 10⁻⁵.
The pumping problem is brutal. Volume of a 1 km tower, 10 m diameter: V = π(5)² × 1000 ≈ 78,500 m³. At sea-level density (1.2 kg/m³), that's 94 tonnes of air. Getting to 10 Pa means removing 99.99% of it. Industrial roughing pumps push maybe 500 m³/h effective at low pressure; a bank of 50 pumps still takes ~24 hours per experiment cycle. Turbomolecular pumps get you the last decade.
Structural loads. External atmospheric pressure on the tower walls: 101,325 Pa × (surface area). For our cylinder, that's π × 10 × 1000 = 31,400 m² of lateral surface, giving 3.18 billion newtons of inward crush force. This is why vacuum chambers are round — hoop stress in a thin-walled cylinder is σ = Pr/t. For a 5 m radius at 1 atm and steel yield ~250 MPa (with safety factor 4): t = 101,325 × 5 / (250×10⁶/4) ≈ 8 mm. Surprisingly modest! But buckling, not yield, dominates — you need stiffening rings every few meters, pushing effective wall thickness to ~30 mm. Total steel: ~74,000 tonnes, roughly one Eiffel Tower's worth.
The deceleration. After 14 seconds of drop, the capsule hits ~140 m/s. Stopping it in a 10-meter polystyrene bead pit at the bottom requires a = v²/2d = 19,600/20 = 980 m/s² — a 100 g crunch. Fine for hardware, deadly for humans. Add magnetic braking rails and you can spread deceleration over 100 m at a survivable 10 g.
What does it buy us? Protein crystallization, colloidal self-assembly, and combustion physics all benefit dramatically from longer microgravity windows. At $10,000/second (rough parabolic-flight economics), 28 seconds per drop × 300 drops/year = $84M/year of equivalent research time — versus ISS experiments at ~$100k/kg-day. Payback on a $2B tower: about 25 years, ignoring the science we couldn't do at all before.
Wikipedia Rabbit Hole
2026-07-17
Wikipedia: Read the full article
Imagine sending a text message in 1865. You'd write it on paper, drop it in a brass canister, and watch it get sucked into a tube at 25 mph, whooshing beneath the streets of Berlin toward its recipient. This was the Rohrpost — literally "tube post" — and for over a century it was the fastest way to send a message across the German capital, short of showing up in person.
The Berlin pneumatic postal network, opened in November 1865, was one of the world's most extensive. At its peak in the 1930s, it covered roughly 400 kilometers of underground iron pipes connecting some 90 post offices. A specially printed Rohrpostbrief (tube letter) or Rohrpostkarte cost more than regular mail, but delivery inside the city was measured in minutes, not hours. In an era before telephones were common in households, this was essentially guaranteed same-hour messaging — Berlin's version of instant messaging.
What makes the system especially fascinating is its afterlife. When Berlin was split by the Wall in 1961, the tubes did something no other communication network dared: they kept crossing the border for a while, because ripping out iron pipework buried under contested streets was more trouble than shutting a valve. West Berlin's civilian Rohrpost limped along until 1963. East Berlin, remarkably, kept its network running until 1976 — a Cold War curiosity where socialist bureaucrats were still shooting canisters of paperwork through Bismarck-era plumbing while West Germans across the wall were dialing direct.
A few threads worth pulling:
The most surprising implication? Berlin's Rohrpost was arguably the world's first large-scale packet-switched delivery network — canisters were addressed, routed through switching stations, buffered when lines were busy, and reassembled at the destination. Nearly a century before ARPANET, Berliners were mailing physical packets through a routed network and getting delivery receipts.
Daily YT Documentary
2026-07-17
Channel: Paititi Institute (1150 subscribers)
This mini-documentary follows participants through a ten-day immersion in the Peruvian Amazon, guided by Indigenous elders who share ecological knowledge accumulated over generations. Unlike the typical eco-tourism travelogue, the Paititi Institute focuses on experiential learning: plant identification, traditional medicine practices, forest navigation, and the relationship between Amazonian communities and one of the most biodiverse ecosystems on Earth.
What makes this worth watching is the access. The Paititi Institute operates a conservation and cultural preservation project deep in the rainforest, and their footage captures things most travel videos miss — the actual pedagogy of elder-to-student knowledge transfer, the sensory reality of daily life in the jungle, and the specific plants and practices that make Amazonian ethnobotany distinct. You get a genuine window into how traditional knowledge gets taught rather than just a highlight reel of exotic scenery.
For viewers interested in ethnobotany, conservation, Indigenous knowledge systems, or the practical realities of rainforest ecology, this offers a substantive look at a working immersion program. The small subscriber count reflects the niche audience, not the quality — this is exactly the kind of documentary made by people who actually live the subject matter rather than parachuting in for B-roll.
Daily YT Electronics
2026-07-17
Channel: Bit & Solder (29 subscribers)
Most hobbyists never think about it, but a cheap AC-powered soldering iron can leak mains voltage through the tip — enough to zap sensitive CMOS ICs, MOSFET gates, or MCU pins the moment you touch a pad. This video from a tiny channel (part 3 of a series) actually measures the leakage current from an old iron and shows why it's dangerous, then walks through a DIY build using a JBC C245 cartridge — the same tip family used in professional rework stations.
The C245 is a genuinely interesting cartridge: it integrates the heater and thermocouple into the tip itself, giving you sub-second thermal recovery and tight temperature control. Watching someone build a controller around it — with proper isolation to avoid the leakage problem demonstrated in part 1 — is a solid crash course in low-voltage power design, thermocouple amplification, and PID temperature control.
Note: the title mixes Vietnamese and English, so you may need auto-translated captions, but the schematics and scope traces speak for themselves.
Daily YT Engineering
2026-07-17
Channel: MKV CONSULTING (209 subscribers)
This is a genuinely useful FEA walkthrough disguised behind a slightly gimmicky title. The premise — how does a 3mm steel plate hold up against escalating impact loads, from a human fist to a car — is a great way to teach the practical intuition behind stress vs. strain, yield vs. ultimate strength, and where linear-elastic assumptions start to break down.
What makes it worth watching is that the creator uses SOLIDWORKS Simulation to set up each scenario with real material properties and boundary conditions, then compares predicted deformation and stress distributions across the four load cases. You get to see how impulse (force × time) matters more than raw force for penetration, why point-loads from a battering ram produce very different failure modes than the distributed load of a vehicle crash, and how mesh choice and contact definitions affect the answer.
For anyone learning FEA, it's a rare small-channel video that actually shows the modeling decisions rather than just showing a colorful stress plot at the end. The MKV Consulting channel is a small independent operation, so the pacing is unhurried and the explanations don't assume prior simulation expertise.
Daily YT Maker
2026-07-17
Channel: Diy projects 🪵 (2 subscribers)
Most of today's candidates were disqualifying shorts or clickbait teasers, so this hand-carved wooden motorcycle from a brand-new 2-subscriber channel is the pick worth watching. The maker attempts to replicate a BMW S1000RR — a sportbike with famously aggressive fairings, asymmetric headlights, and complex swingarm geometry — using only wood and hand tools.
What makes this kind of build interesting is watching a maker translate the compound curves of an injection-molded fairing into carved planes, then work out how to represent mechanical assemblies (fork tubes, chain drive, brake calipers) in a fundamentally different medium. Every joint becomes a design decision: dowel or lap? Grain-with or grain-against for a leaning tank shape? How do you hint at a spoked wheel without a lathe?
These early-channel scratch-builds tend to be honest about the process — you see the mistakes, the re-cuts, and the improvised jigs, which is where the real learning lives. Even if the final product is rough, the sequencing (which subassembly gets built first, how the frame constrains the bodywork) is transferable to any scale modeling or prop-making project.
Note: with only 2 subscribers and a vague description, quality is a gamble — this is the least-bad pick from a weak batch dominated by shorts and emoji-heavy factory-style edits.
Daily YT Welding
2026-07-17
Channel: It'll WorkShop (183 subscribers)
Most of this week's candidates are hashtag-spam Shorts or wordless background-music clips, so the pickings are slim. This shop tour from a brand-new channel (183 subscribers) is the standout — a genuine long-form video where the maker walks through their small home workshop, introduces each machine, and explains the modifications they've already made and the ones they're planning.
Shop tours from tiny channels are genuinely useful viewing for anyone setting up or upgrading a hobby metalworking space. Unlike glossy tours from established creators showing off sponsored gear, small-shop tours tend to be honest about compromises: which machines were bought used, what got modified to fit a garage footprint, what tooling the maker actually reaches for versus what sits unused. You get to see how a working amateur has arranged a lathe, welder, and hand tools in a constrained space, and hear the reasoning behind machine choices at a realistic budget.
It's also a good chance to catch a promising channel at the ground floor. If the maker follows through on the modifications they mention, subsequent videos on those mods will be far more instructive than yet another algorithm-optimized Short. Worth 10 minutes of your time and a subscribe if the workshop feels like the kind of space you'd want to spend time in.
