25 newsletters today.
Abandoned Futures
2026-06-04
On 3 May 1977, Bell Helicopter rolled out the XV-15 at its Arlington, Texas plant. Two aircraft were built under a joint NASA/Army contract awarded in April 1973 for $27 million. Tail numbers N702NA and N703NA. Each had two 1,550 shp Lycoming LTC1K-4K turboshafts mounted in nacelles at the wingtips, swiveling 95Β° from helicopter to airplane mode. First hover: 3 May 1977. First full conversion to airplane mode: 24 July 1979 at Bell's Arlington facility, pilot Dorman Cannon at the controls.
The XV-15 didn't just work β it worked spectacularly. It hit 301 knots in level flight (faster than any helicopter then or now), climbed to 29,000 feet, demonstrated autorotation, single-engine conversions, shipboard landings on the USS Tripoli in 1982, and flew at the 1981 Paris Air Show where it stole the show. Over 23 years of testing, the two aircraft logged more than 800 hours with no fatal accidents until N702NA was lost in August 1992 due to a maintenance error (improperly secured flaperon hardware), not a design flaw.
So what happened? The XV-15 was a research aircraft, not a production program. Bell and Boeing won the JVX contract in 1983 to scale the concept into the V-22 Osprey β and immediately threw away most of what the XV-15 had taught them. The V-22 ballooned from a 30,000 lb gross weight target to over 60,000 lb. It introduced composite proprotors with different aeroelastic behavior, a complex cross-shaft drive system under enormous torque, and a fly-by-wire flight control system far more elaborate than the XV-15's mechanical/SCAS hybrid. The result: 30 prototypes, four fatal crashes between 1991 and 2000 killing 30 people, multiple cancellation attempts by SecDef Dick Cheney in 1989-1992, and an initial operational capability not declared until 2007 β thirty years after the XV-15 first hovered.
The XV-15 sat in NASA Ames's hangar essentially proving that tiltrotor was a solved problem at the 15,000 lb class. Then everyone ignored it.
Why it matters in 2026: the entire eVTOL industry β Joby, Archer, Beta, Wisk β is rediscovering tilting-thrust aerodynamics that Bell characterized exhaustively between 1977 and 1992. The XV-15's wind tunnel data at NASA Ames is still cited in FAA certification packages. Bell's own V-280 Valor, which won the FLRAA contract in December 2022 over the Sikorsky-Boeing Defiant X, is essentially an XV-15 done properly: tilting rotors only (not the whole nacelle), no cross-shaft asymmetry issues, modern composites, distributed electric backup, and FBW that's matured by 40 years of fighter-aircraft heritage.
What modern technology unlocks a true XV-15 revival at small scale:
The XV-15 proved in 1979 that tiltrotor was real. The V-22 obscured that fact with its troubles. The current eVTOL boom is, in effect, a 47-year-delayed validation of two aircraft that flew before Star Wars had a sequel.
Daily Automotive Engines
2026-06-04
The wastegate decides how much exhaust gas bypasses the turbine wheel, which directly sets your boost ceiling. But the actuator that moves the wastegate flapper is where modern boost control gets interesting. Three flavors dominate: pneumatic spring-pressure, vacuum-assisted, and electronic.
Pneumatic (spring-pressure) actuators are the old-school standard. A diaphragm sees boost pressure through a hose tapped off the compressor outlet. When boost overcomes the internal spring's preload, the diaphragm pushes a rod that cracks the wastegate open. Simple, reliable, no electronics. The spring rate sets your base boost β a 7 psi spring means the wastegate starts opening at 7 psi. To get more, you bleed actuator pressure with a boost controller (manual ball-and-spring or electronic solenoid pulsing at 30 Hz) so the actuator "sees" less than actual manifold pressure.
Vacuum-assisted dual-port actuators add a second port on the opposite side of the diaphragm. The ECU can apply vacuum to actively hold the wastegate shut, allowing boost to climb above spring pressure without playing duty-cycle games. This gives faster spool because the wastegate stays fully closed during transient throttle inputs. Common on Subaru EJ257 and many Mitsubishi 4G63 setups.
Electronic actuators (often called EWG β electronic wastegates) use a DC motor with position feedback through a Hall-effect sensor. The ECU commands an exact wastegate angle, not a pressure differential. Result: precise boost control during transients, perfect overboost protection, and the ability to pre-position the wastegate before the driver hits throttle. BMW's N55 and N63, Ford's 2.7L EcoBoost, and most modern turbo engines now use EWGs. They also enable scavenge-mode tricks where the wastegate cracks open at idle to reduce backpressure.
Rule of thumb for spring selection: pick a spring rated at roughly 70β80% of your target boost. Want 20 psi? Run a 14β16 psi spring. Going too soft makes the controller work harder and risks wastegate flutter on tip-in; too stiff means you can't run low boost for cruising or wet conditions.
Real-world example: The Garrett GTX3582R Gen II ships with a standard 1-bar (14.5 psi) actuator. On a built 2JZ targeting 30 psi, tuners typically swap to a 1.5-bar (22 psi) spring and use a 4-port MAC solenoid pulsed by the ECU. The stiffer spring keeps the wastegate slammed shut during spool, dropping time-to-boost by 200β400 ms compared to the stock spring with heavy duty cycle.
Daily Debugging Puzzle
datetime.now() UTC Trap: The Session Timer That Drifts by Your Timezone2026-06-04
This function decides whether a session is still alive. The database stores created_at as a naive datetime in UTC (a common legacy convention), and the TTL is 24 hours. Tests pass. Staging passes. Production, six months later, starts evicting users at unpredictable times.
from datetime import datetime, timedelta
SESSION_TTL = timedelta(hours=24)
def session_is_valid(created_at_utc: datetime) -> bool:
"""
created_at_utc: naive datetime recorded as UTC in the DB.
Returns True if the session is younger than SESSION_TTL.
"""
now = datetime.now()
return (now - created_at_utc) < SESSION_TTL
def cleanup_expired(sessions):
return [s for s in sessions if session_is_valid(s["created_at"])]
datetime.now() returns the local-timezone wall-clock as a naive datetime β no tzinfo attached. created_at_utc is also naive, but stored in UTC. Python has no way to know they live in different zones, so the subtraction proceeds as if both were the same clock. The resulting timedelta is silently offset by your machine's UTC offset.
now - created_at_utc is 5 hours too large. A session created 30 seconds ago reports an age of 5h00m30s. Sessions die after 19 hours of real time.Trues.The deeper problem is that Python's naive datetimes are silently wrong rather than loudly broken. There's no TypeError here to grab your attention; the arithmetic just happens with the wrong reference frame. The function's docstring claims UTC; datetime.now() ignores the claim.
A tempting "fix" is to swap in datetime.utcnow() β and it does eliminate the offset bug. But utcnow() is itself a trap: it returns a naive datetime that also claims to be UTC, refuses to compare against aware datetimes (TypeError: can't subtract offset-naive and offset-aware), and was deprecated in Python 3.12 precisely because so many bugs flow from it.
Use timezone-aware datetimes end-to-end. Pass tz=timezone.utc to datetime.now(), and treat naive datetimes at I/O boundaries as a bug to fix at parse time, not propagate.
from datetime import datetime, timedelta, timezone
SESSION_TTL = timedelta(hours=24)
def session_is_valid(created_at: datetime) -> bool:
"""created_at: timezone-aware datetime."""
if created_at.tzinfo is None:
raise ValueError("created_at must be timezone-aware")
now = datetime.now(timezone.utc)
return (now - created_at) < SESSION_TTL
If the DB column really is naive-UTC and you can't migrate it, attach the zone at the boundary: created_at.replace(tzinfo=timezone.utc). Doing it in one place is far safer than hoping every caller remembers to use utcnow() instead of now() β a rule that looks like it's holding right up until a tired engineer types five fewer characters.
Daily Digital Circuits
2026-06-04
Clock gating stops dynamic power, but leakage current keeps flowing through every transistor whose gate is biased β even when nothing is switching. At 7nm, leakage can be 40-60% of total chip power. The only way to truly stop it is to physically disconnect the block from the power rail. That's power gating.
The mechanism: insert a large PMOS "header" transistor between VDD and the block's local power rail (called VVDD, or "virtual VDD"). When the block is active, the header is fully on and VVDD β VDD. When the block sleeps, the header turns off and VVDD floats β leakage drops by 100-1000Γ. NMOS "footer" transistors between the block and ground work symmetrically.
The engineering tradeoffs are brutal:
Real-world example: Apple's A-series and M-series chips power-gate individual CPU cores, GPU clusters, and the Neural Engine independently. When you close an app, the relevant block goes into "deep sleep" β header off, state saved to retention flops, isolation cells clamped. Wake-up latency is around 100Β΅s, dominated by VVDD ramp time. This is why mobile SoCs can idle at <50mW while still being able to burst to 15W.
Rule of thumb for header sizing: Make the header's on-resistance such that IR drop is β€5% of VDD at peak block current. For a block drawing 200mA at 1V, target Ron β€ 0.25Ξ©, which typically means a header transistor with W/L around 10,000Γ a standard logic gate.
Daily Electrical Circuits
2026-06-04
You've already met lead compensation, where you add a zero below a troublesome pole to recover phase margin. Lag compensation is its conceptual sibling but solves a completely different problem: you need more DC and low-frequency loop gain (for accuracy, disturbance rejection, or steady-state error) without moving the crossover frequency where stability is decided.
The trick: place a pole-zero pair well below your existing crossover. The pole comes first (at very low frequency), the zero follows about a decade higher. Between them, gain rolls off by 20 dB/decade. Above the zero, the network looks like a flat attenuator β the high-frequency loop shape (and thus phase margin) is essentially untouched, while DC gain climbs by the pole-to-zero ratio.
Passive op-amp realization: in the feedback path of an inverting amplifier, replace Rf with Rf in series with (R2 || C). At DC, C is open, so gain = -(Rf+R2)/Rin. At high frequency, C shorts R2 out, so gain = -Rf/Rin. The boost ratio is (Rf+R2)/Rf.
Real-world example β precision photodiode TIA driving a slow servo loop: Suppose your transimpedance amp has 60 dB DC gain and crossover at 10 kHz, but the optical reference drifts and you need 100Γ better DC tracking (40 dB more). Insert a lag network with f_z = 100 Hz, f_p = 1 Hz. Pick R2 = 10 kΞ©, so C = 1/(2ΟΒ·10kΒ·100) β 160 nF. Then Rf must satisfy (Rf+R2)/Rf = 100, giving Rf β 101 Ξ©. The pole lands at 1/(2ΟΒ·10.1kΒ·160n) β 100 Hz... wait β that's wrong. Re-derive: you want the pole a decade below the zero, so scale R2 and C together. Practical rule: place f_z at least a decade below your loop crossover so the residual phase lag (worst-case ~-5.7Β°) doesn't erode your hard-won phase margin.
Rule of thumb: if crossover is at f_c, put f_z β€ f_c/10 and f_p = f_z/(boost ratio). The phase margin penalty is approximately arctan(1/10) β 5.7Β° β a small price for 20β40 dB of extra DC accuracy.
Watch out for two gotchas: (1) the slow pole creates a long settling tail β step responses develop a "creep" lasting 1/f_p seconds; (2) in switching regulators, placing f_z too close to crossover can interact with the output capacitor's ESR zero and cause peaking.
Daily Engineering Lesson
2026-06-04
Every control loop has a delay between when the controller moves the valve and when the sensor sees the result. Part of that delay is the process lag (the exponential rise of a first-order system), and part is pure dead time β a flat interval where absolutely nothing happens at the measurement. Dead time is the assassin of control loops, and the ratio of dead time to lag determines whether your loop will be easy, hard, or essentially impossible to tune.
Where dead time comes from:
The controllability rule of thumb uses the dead-time-to-time-constant ratio, ΞΈ/Ο:
Worked example β a sheet dryer: Paper enters a 6 m drying section at 2 m/s. The moisture sensor is at the exit. Dead time ΞΈ = 6/2 = 3 seconds before any control action shows up. Suppose the dryer's thermal time constant Ο = 4 seconds. Then ΞΈ/Ο = 0.75 β solidly difficult. A Ziegler-Nichols tuning gives proportional gain Kc β 1.2(Ο/ΞΈ) = 1.6 and integral time Ti β 2ΞΈ = 6 s. Crank Kc higher and the loop will hunt indefinitely, because the controller is reacting to errors that already happened seconds ago.
What engineers actually do about it:
The single most common tuning mistake is raising the gain to fight sluggishness in a dead-time-dominant loop. You can't outrun a delay β you can only respect it.
Forgotten Books
2026-06-04
Book: The history of a book by Carey, Annie. (1873)
Read it: Internet Archive
Tucked into the list of illustrations of Annie Carey's 1873 popular-science book, The History of a Book, is an entry that quietly contradicts what almost every English speaker assumed β and many still assume β about a familiar material:
"Chinese Rice-Paper Plant, and Method of Preparing the Paper . . . 17"
Carey was a Victorian populariser of science, author of companion titles like The Autobiography of a Lump of Coal and The Fads of Knowledge, who specialised in turning industrial processes into approachable narratives for general readers. Her stated goal in this volume was to call attention to "the thought and skill, the care and labour, which are more or less required and expended whenever a Book is 'Printed and Published.'" In doing so she preserved a detail that has slipped out of common knowledge: "rice paper" is not, and never was, made from rice.
The "Chinese Rice-Paper Plant" Carey illustrates is Tetrapanax papyrifer β a small tree in the ginseng family native to Taiwan. The papery sheets the Victorians prized for delicate watercolours, artificial flowers, and pressed botanical specimens were produced by:
It is, in other words, not a paper at all in the modern sense β no pulping, no felting of fibres, no mould. It is a single shaved sheet of living plant tissue. That technical distinction was widely understood in 1873, when Chinese pith paintings were a fashionable Victorian souvenir trade; by the mid-20th century the export industry had collapsed, the source plant had been forgotten in the West, and the name "rice paper" had migrated to a completely unrelated product: the thin sheets of rice-flour and tapioca starch used for Vietnamese spring-roll wrappers.
Modern botanists confirm Carey's account in every detail. Tetrapanax papyrifer is now better known to Western horticulturists as an aggressive ornamental garden plant ("rice paper plant") than as the source of an art medium. Surviving Victorian pith paintings β the ones our great-great-grandparents may have brought home from Canton β are now museum-conservation specialties precisely because curators have had to relearn what the substrate is.
So the next time you see "rice paper" on a packet of spring-roll wrappers, remember Carey's illustration on page 17: the original rice paper was a shaved spiral of pith from a small Taiwanese tree, and the rice was always a mistranslation.
Forgotten Darkroom
2026-06-04
Book: The elementary chemistry of photographic chemicals by Ellis, C. Sordes (Charles Sordes) (1903)
Read it: Internet Archive
Tucked into the front-matter advertisements of this 1903 chemistry primer is a casual line about a product so ordinary to Edwardians that it needed no explanation, but so alien to us that it reads like a riddle. Ilford, Limited β the great British photographic house β listed among its papers:
ILFORD PAPERS β P.O.P. β KALONA (self-toning) β BROMIDE β GASLIGHT (no dark-room) β PLATONA (platinum) β FOR SUPERB PRINTS WITH EASE AND CERTAINTY.
That parenthetical β "no dark-room" β is the forgotten miracle. By 1903, amateur photographers could buy a paper so insensitive to light that they could handle it, expose it, and develop it in the soft yellow glow of a household gas jet, in the kitchen, with the curtains drawn. No red lamp. No light-tight closet. No fumbling in the pitch black.
The trick was chemistry. Standard "bromide" papers, also listed in the same advertisement, used silver bromide, which is wildly sensitive β they demanded a true darkroom. Gaslight paper swapped much of the bromide for silver chloride, which is dramatically slower. You couldn't use it in the camera, but for contact-printing from a negative under a household lamp, its sluggishness was a feature, not a bug. A print that would have fogged on bromide paper in seconds could sit safely on the kitchen table under gaslight.
The technology was invented in the 1880s (most famously by the American firm Nepera, whose "Velox" paper Eastman Kodak bought from Leo Baekeland β yes, the Bakelite inventor β in 1899 for what was then a fortune). For roughly forty years, gaslight paper democratized home photography. Then the rise of enlargers, faster films, and eventually electric safelights pushed it into obsolescence. By mid-century it was gone, and with it the entire idea that you could do "real" photographic printing in your living room.
What's striking from a modern vantage is how cleverly the Edwardians threaded a needle we no longer think about: they tuned a material's laziness to match the ambient light of the era. A modern equivalent would be something like e-ink displays, which trade speed for tolerance to bright sun β engineering around human environments instead of demanding humans engineer around the technology.
Next time you snap a photo on a phone in a sunlit cafΓ© and watch it appear instantly, remember that someone's great-grandmother did the analog version of the same trick β making a print, by lamplight, between courses of dinner.
Forgotten Patent
2026-06-04
On June 17, 1948, Bell Telephone Laboratories filed US Patent 2,524,035, titled "Three-Electrode Circuit Element Utilizing Semiconductive Materials." The inventor of record was John Bardeen and Walter Brattain; a companion filing (US 2,569,347) covered William Shockley's junction transistor variant developed weeks later in a competitive frenzy. The patent describes a small slab of germanium with two phosphor-bronze "cat's whisker" point contacts spaced about 50 microns apart, pressed onto a base electrode. A tiny current injected at one contact (the emitter) modulated a much larger current flowing to the other (the collector). It was an amplifier β but built from a crystal, not a vacuum.
The breakthrough had happened six months earlier, on December 23, 1947, when Bardeen and Brattain demonstrated audio amplification through their crude germanium device to Bell Labs management. Shockley, embarrassed at being absent from the actual discovery, locked himself in a Chicago hotel room over New Year's and worked out the theory of the bipolar junction transistor β a sandwich of doped semiconductor layers that didn't need finicky point contacts at all. His version (filed June 1948, granted 1951) is what actually went into production.
Why it was shocking for 1948: The dominant amplifier was the vacuum tube β hot, fragile, power-hungry, and the size of a thumb. A 1947 telephone exchange ran on thousands of them; ENIAC used 17,468. Everyone knew tubes were the bottleneck for scaling electronics, but nobody had a replacement. Bell Labs' device was solid-state, cool-running, drew milliwatts instead of watts, and could in principle be made arbitrarily small. The press conference on June 30, 1948 buried the announcement on page 46 of the New York Times.
The modern connection is almost too direct to be interesting β except for what the patent didn't anticipate:
The Nobel Prize came in 1956, shared among all three. By then, Shockley had alienated his colleagues so thoroughly that his Mountain View startup β Shockley Semiconductor β was hemorrhaging staff. Eight of them ("the traitorous eight") left in 1957 to found Fairchild Semiconductor. From Fairchild came Intel, AMD, and the seed of Silicon Valley itself. The patent's most consequential legacy isn't electrical β it's geographic.
Daily GitHub Zero Stars
2026-06-04
Language: Unknown
This repo is a quiet sleeper hit in the increasingly crowded "agents touching UIs" space. The description tells you exactly what it is β shared headless primitives for autonomous UX drivers β and that framing alone is worth pausing on. Most agent-meets-frontend libraries today bundle UI, orchestration, and state into one opinionated stack. fancy-auto-common instead carves out the boring-but-essential plumbing layer underneath.
From the description, it ships four primitives:
The repo positions itself as a dependency for two siblings: agent-integrations and fancy-flow's FlowRunnerUx. That hints at a deliberate monorepo-adjacent architecture where the headless contract is extracted so multiple consumers can implement it independently. It's the kind of design choice that suggests the authors have already lived through the pain of agent UIs and decided to refactor before scaling up.
Who would benefit? Engineers building copilot-style or fully autonomous UX layers, anyone designing human-in-the-loop interfaces where reversibility matters, and library authors who want to study a clean separation between "what an agent intends" and "what the UI renders."
Daily Hardware Architecture
2026-06-04
Simultaneous Multithreading (Intel calls it Hyperthreading) lets one physical core pretend to be two logical cores. The trick: most of a core's execution resources sit idle most of the time. A second thread can use the slack. But "sharing" hides a brutal question: which structures get split, and how?
There are three partitioning strategies, and every structure in the core picks one:
The front-end alternates fetch between threads cycle-by-cycle (or by ICOUNT, picking whichever thread has fewer in-flight instructions). This is why a single-threaded benchmark on an SMT core often runs slightly slower than with SMT disabled β the fetch alternation steals cycles even when the other thread is idle, and competitively-shared caches get split between two working sets.
Concrete example: Run two memory-bound threads on one SMT core. Each thinks it has the full L1, but they share 32 KB. Effective per-thread cache is ~16 KB. If both working sets exceed 16 KB but fit in 32 KB, SMT can make both threads slower than running them sequentially. This is why HPC shops routinely disable SMT β their codes are tuned to use the whole cache.
Rule of thumb: SMT gives a 15β30% throughput boost when threads are diverse (one memory-bound, one compute-bound) and they don't fight for the same execution ports. It gives 0% or negative when threads are identical and already saturating one resource β two AVX-512 threads share one FMA unit and fight every cycle.
The killer detail: a thread that takes an L3 miss holds its ROB slots for ~200 cycles doing nothing. Without SMT, the core is idle. With SMT, the other thread keeps the back-end busy. SMT's real win isn't parallelism β it's latency hiding.
Hacker News Deep Cuts
2026-06-04
Link: https://theamphour.com/725-the-secret-life-of-circuits-with-lcamtuf-michal-zalewski/
HN Discussion: 2 points, 1 comments
MichaΕ Zalewski β known online as lcamtuf β is one of those rare technologists whose work has shaped entire disciplines without him ever seeking the spotlight. For two decades he was a fixture of the security world: author of Silence on the Wire (still one of the most original books ever written on passive network reconnaissance), creator of afl-fuzz (which arguably kicked off the modern coverage-guided fuzzing era and found bugs in nearly every piece of widely-used C software on the planet), and a longtime director of information security at Google.
What makes this Amp Hour episode worth your time is that it's not a security interview. The Amp Hour is a hardware/electronics podcast, and Zalewski has spent the past several years quietly pivoting into analog and digital electronics β writing some of the clearest tutorials on the subject available anywhere on the open web. His site has become a go-to reference for engineers trying to actually understand what's happening inside op-amps, transistors, and feedback loops, rather than memorizing cookbook formulas.
Listeners can expect discussion of:
For a technical audience, the appeal is twofold. First, lcamtuf is a genuinely original thinker β his explanations tend to dissolve confusion rather than paper over it. Second, the interview captures a fairly rare archetype: the senior software person who decided that understanding the physical substrate was worth years of effort, and who can articulate why. If you've ever bounced off an electronics textbook, or wondered whether the security-mindset transfers to hardware, this is an hour well spent.
The Amp Hour's long-form format means you get the actual reasoning, not soundbites β which suits a guest like Zalewski, who tends to think out loud carefully.
HN Jobs Teardown
2026-06-04
Source: HN Who is Hiring
Posted by: seregine
Outschool's posting (ID 22672707) is the most revealing in this thread because it captures a specific moment: a YC W16 marketplace pivoting from "nice-to-have enrichment" to "essential infrastructure" overnight as schools close. Every word choice matters here.
The stack tells a clear story. They're running TypeScript + React + Apollo GraphQL + Node/Express + PostgreSQL. This is the canonical 2020 "boring-but-modern" stack β no exotic choices, no Rust rewrites, no microservices brag. Apollo GraphQL is the only opinionated pick, and it makes sense for a marketplace: teachers, parents, kids, and classes all have deeply nested relational queries (a class has a teacher who has reviews who have parents who have other enrolled kids). REST would force them into N+1 hell or bespoke endpoints per screen. They're optimizing for iteration speed on a complex domain model, not raw throughput.
What "scaling rapidly to support parents and teachers affected by school closures" actually means. This is a company experiencing involuntary hypergrowth. They didn't plan for COVID; COVID arrived and now their Zoom-based marketplace is suddenly the only game in town. The fact that they're hiring Senior Fullstack β not platform engineers, not SRE, not a VP β signals they still need feature velocity more than they need scalability rescue. The fires haven't reached the database yet.
Cultural tells worth flagging:
The trends this highlights: (1) Zoom-as-infrastructure became a load-bearing dependency for entire business models in weeks. (2) Marketplace companies in education are absorbing demand that public institutions can't serve. (3) GraphQL has graduated from "trendy" to "default for product-heavy startups" β no one feels they need to justify it anymore. (4) "Onsite SF" in this posting will age poorly within months; the implicit assumption that offices return is the only dated thing here.
Daily Low-Level Programming
2026-06-04
When a core has nothing to do, spinning on a memory location burns power and starves the SMT sibling thread of execution resources. MONITOR/MWAIT is the hardware mechanism that lets a core sleep until a specific cache line is written, without polling.
The protocol is two instructions:
The clever part: there's no polling loop and no syscall. The wake signal piggybacks on the cache coherence traffic that would happen anyway when another core writes to that line. A write from another core sends an invalidation message to this core's L1; the monitor logic sees the invalidation and breaks out of MWAIT.
Real-world example: DPDK and Spinlocks. DPDK's poll-mode drivers traditionally spin at 100% CPU waiting for packets. Modern DPDK uses rte_power_monitor() which wraps UMWAIT (the user-mode variant added in Tremont/Tiger Lake) to sleep on the NIC's RX descriptor ring tail pointer. When the NIC DMAs a new descriptor, the cache line invalidation wakes the core in ~50ns β comparable to spinning, but the core drops to ~5W instead of ~25W. Across a 64-core packet processor, that's a kilowatt saved at idle.
The Linux kernel uses MWAIT in cpuidle: when a CPU goes idle, it executes MWAIT with a C-state hint chosen by the menu/teo governor based on predicted idle duration. The mwait_idle_with_hints() function in arch/x86/include/asm/mwait.h is the entry point.
Rule of thumb: The wake latency scales with C-state depth.
If your latency budget is under 10Β΅s, force C1 via intel_idle.max_cstate=1 on the kernel command line β otherwise the governor will happily put cores into C6 and your tail latencies will explode.
One trap: MONITOR's watched region is implementation-defined, often 64 bytes but sometimes 128. Reading CPUID leaf 5 returns the exact min/max monitor line size. False wakeups from adjacent variables are the MWAIT version of false sharing.
RFC Deep Dive
2026-06-04
RFC: RFC 2661
Published: 1999
Authors: W. Townsley, A. Valencia, A. Rubens, G. Pall, G. Zorn, B. Palter
L2TP is one of those protocols that quietly powers a huge chunk of the internet's plumbing β every time a DSL subscriber's PPP session gets handed from a local ISP's access concentrator to a distant network, L2TP is probably doing the hand-off. It's also half of the venerable L2TP/IPsec VPN stack still shipped in every major OS in 2026.
The problem. In the mid-1990s, dial-up PPP was the universal access protocol. But PPP assumed the user dialed directly into their service provider. As ISPs consolidated and corporate remote-access grew, you wanted a user to dial a local Network Access Server (NAS) and have their PPP session magically appear at a remote Home Gateway β extending the PPP link across the IP backbone. Cisco solved this with L2F (RFC 2341). Microsoft and friends solved it with PPTP. The IETF, predictably, told both camps to go sit in a room together. The result was L2TP, which borrowed L2F's clean separation between control and data channels and PPTP's wider deployment story.
Key design decisions:
LAC (L2TP Access Concentrator) terminates the physical/PPP layer; the LNS (L2TP Network Server) terminates the PPP session logically. The PPP frames tunnel between them.Why it matters today. Three reasons. First, broadband: nearly every DSL provider in Europe and much of Asia runs PPPoE from the subscriber to a local BRAS, then L2TP from the BRAS to the ISP that actually owns the customer (LAC/LNS wholesale model). Without L2TP, the wholesale broadband market as we know it wouldn't exist. Second, VPN: L2TP/IPsec is still the lowest-common-denominator VPN on macOS, iOS, Windows, and Android β when WireGuard isn't an option, this stack is. Third, mobile: L2TPv3 (RFC 3931) generalized the protocol beyond PPP to tunnel arbitrary Layer 2 frames, and shows up in MPLS pseudowire deployments.
Quirky bits. The RFC has a delightful section explicitly noting that running L2TP over L2TP is allowed but "may cause undesirable interactions" β a polite way of saying don't do it. The hello-keepalive mechanism is optional but universally implemented because without it, half-dead tunnels accumulate forever. And the spec's authentication is just a CHAP-style shared-secret challenge, which is why anyone treating L2TP as a security boundary without IPsec is asking for trouble.
Stack Overflow Unanswered
2026-06-04
Stack Overflow: View Question
Tags: c++, assembly, clang, llvm, compiler-construction
Score: 5 | Views: 102
The asker is building an LLVM pass that does two related things: rewrite specific call sites to go through an indirection (a trampoline), and emit that trampoline as a single, globally-visible chunk of assembly into the final binary. The call-site rewriting is the easy half β a MachineFunctionPass can swap the call target on the MI stream. The hard half is materializing the trampoline itself as a first-class symbol so the rewritten calls can name it at link time.
Why it's tricky. LLVM gives you several places to inject assembly, and each has different visibility and lifetime semantics:
Module::appendModuleInlineAsm() emits text into the module's inline-asm blob. It reaches the assembler, but the symbols it defines aren't tracked by LLVM IR, so passes downstream (and LTO) can't reason about them.Function with a naked attribute plus a single inline-asm call gives you a real symbol the linker resolves, at the cost of a fake function body and the calling-convention dance.AsmPrinter / MCStreamer layer (override emitEndOfAsmFile or use a custom AsmPrinterHandler) lets you drop raw MCInsts or directives into the output stream after all functions are printed.Direction. For a trampoline that must exist exactly once per module and be referenced by name from rewritten calls, the cleanest approach is the AsmPrinter route combined with an IR-level symbol declaration:
Function (no body) with the trampoline's mangled name and the correct signature. This gives the MachineFunctionPass a stable GlobalValue to retarget calls to.AsmPrinter and override emitEndOfAsmFile (or emitStartOfAsmFile) to emit the trampoline section header, .globl, alignment, the label, and the instruction bytes β either as parsed MCInsts via the target's MCInstPrinter, or as a single OutStreamer->emitRawText() for pure asm.Gotchas. Section placement matters: the trampoline must land in an executable section (.text) with appropriate alignment, and on ELF you'll want .type @function + .size so backtraces and the dynamic linker behave. COMDAT or linkonce_odr linkage avoids duplicate-symbol errors when the same module is compiled into multiple objects that later link together. LTO is another landmine β appendModuleInlineAsm survives LTO but loses optimizer visibility, while a declared function symbol survives LTO cleanly only if the linker can find the definition in some TU. Finally, if the trampoline clobbers non-volatile registers, the rewritten call sites need their register-mask / liveness updated so the register allocator doesn't assume callee-saved values survive.
Daily Software Engineering
2026-06-04
The textbook rule is "make your servers stateless so any request can go to any node." It's good advice β until you're paying to rebuild expensive per-user state on every request. Sticky sessions (also called session affinity) route all requests from a given client to the same backend node, so that node can keep cached or in-memory state for that user.
The load balancer picks a node on the first request and "pins" subsequent requests to it, usually via a cookie (JSESSIONID, AWSALB) or a hash of the client IP. AWS ALB, NGINX (ip_hash or sticky cookie), and HAProxy all support this natively.
When stickiness earns its keep:
What it costs you:
Rule of thumb: if the cost of rebuilding per-user state on a cold node exceeds ~50ms and that state is requested more than once per minute per user, stickiness is probably worth it. Below that threshold, the cache-miss tax is cheaper than the operational complexity stickiness adds.
Hybrid approach that usually wins: use sticky sessions as a performance optimization, not a correctness requirement. Keep authoritative state in Redis or the database. Treat the in-memory copy as a cache that any node could rebuild. Now you get the latency win without the failover nightmare β losing a node degrades performance for affected users, but doesn't break them.
Tool Nobody Knows
2026-06-04
You wrote a distributed system. Then you ran it on a gigabit LAN and called it tested. Out in the wild β cellular tethering, transatlantic peers, a switch with a dying capacitor β your retry logic falls apart and your "exactly once" semantics become "yeah, three or four times, give or take." You need to simulate that hostile network without waiting for production to do it for you.
tc is part of iproute2 and has been in every Linux distro since the late 90s. Its netem qdisc β network emulator β lives in the kernel and mangles packets on the actual TCP stack. No userspace proxy, no client reconfiguration, no missed corner cases because someone forgot to route through Toxiproxy.
Add 100ms of latency to every packet leaving eth0:
sudo tc qdisc add dev eth0 root netem delay 100ms
Latency with jitter, drawn from a normal distribution:
sudo tc qdisc add dev eth0 root netem delay 100ms 20ms distribution normal
Five percent packet loss, with correlation (loss tends to come in bursts on real links):
sudo tc qdisc add dev eth0 root netem loss 5% 25%
Pile it on β latency, loss, bit corruption, and reordering all at once:
sudo tc qdisc add dev eth0 root netem \
delay 80ms 10ms \
loss 1% \
corrupt 0.1% \
reorder 25% 50% \
duplicate 0.5%
Inspect the current rules, then tear it all down:
tc qdisc show dev eth0
sudo tc qdisc del dev eth0 root
Naive netem will eat your SSH session alive. Use a prio qdisc with a u32 filter so only the traffic you're actually testing gets abused. Here we punish Postgres on port 5432 and leave everything else alone:
sudo tc qdisc add dev eth0 root handle 1: prio
sudo tc qdisc add dev eth0 parent 1:3 handle 30: \
netem delay 200ms 50ms loss 3%
sudo tc filter add dev eth0 protocol ip parent 1:0 prio 3 u32 \
match ip dport 5432 0xffff flowid 1:3
Now your app's database connection gets the WAN treatment while your shell stays usable. Filter on source IP, destination IP, protocol, TOS, anything u32 can match.
Inside a container with CAP_NET_ADMIN, you can netem the veth pair or even loopback. Spin up your service stack with docker-compose, attach to one container's network namespace, slap 300ms onto the link to the database container, and watch the connection-pool timeouts you swore couldn't happen:
docker run --cap-add=NET_ADMIN --rm -it myapp:test \
sh -c 'tc qdisc add dev eth0 root netem delay 300ms loss 2% && \
./run-integration-tests.sh'
iptables -j REJECT is binary β connected or dead. Real networks degrade.One footgun: netem only shapes egress. To garble inbound traffic, redirect it through an ifb (intermediate functional block) device first β modprobe ifb; ip link set ifb0 up β then apply the qdisc there. It's a one-liner once you've seen it; it's an afternoon of confusion the first time.
tc qdisc add β¦ netem β the bugs you'll find in the next hour are the ones that would have paged you at 3am six months from now.
What If Engineering
2026-06-04
There are roughly 1 million abandoned mines globally, many descending a kilometer or more into bedrock. They're geotechnical liabilities β sources of acid drainage and subsidence. But each one is also a pre-bored, pre-stabilized vertical drop that took decades to excavate. What if we filled them with sand, hauled up when the grid has surplus, dropped down when it's hungry?
Gravitational potential energy is the most idiot-proof energy storage we have: E = mgh. No phase changes, no electrochemistry, no degradation cycle limit. Take a representative deep mine β South Africa's Mponeng descends 4 km, but let's use a more typical 1,000-meter shaft.
Lift 1 million tonnes of sand (a cube about 80 m on a side) up that shaft:
E = (10βΉ kg)(9.81 m/sΒ²)(1000 m) = 9.81 Γ 10ΒΉΒ² J = 2,725 MWh = 2.73 GWh
For scale: that's 14Γ the energy capacity of Tesla's Hornsdale "big battery" in South Australia, stored in a single shaft. Enough to power 90,000 homes for a day.
The clever trick is that power and capacity decouple. Capacity scales with sand inventory; power scales with how fast you move it. A high-throughput conveyor and counter-weighted skip system moving 100 tonnes/second delivers:
P = (10β΅ kg/s)(9.81)(1000) β 980 MW
Comparable to a mid-sized nuclear reactor's output β for 2.8 hours. Modern mine hoists already move 50+ tonnes per skip at 18 m/s, so this is engineering, not fantasy.
Sand costs about $10/tonne. So the working fluid for a 2.73 GWh facility costs ~$10 million. A lithium-ion equivalent at $200/kWh-installed would run $545 million just for cells, and degrade ~2%/year. Sand doesn't degrade. It is, in fact, already degraded β that's why it's called sand.
The Swiss firm Energy Vault already builds this above-ground with concrete blocks on a tower; their pivot away from gravity toward batteries tells you something about how brutal the engineering is. But underground sand storage sidesteps their hardest problem β wind loading on a 100-m tower of bricks. Repurposing 1,000 of the world's deeper abandoned mines could yield roughly 2β3 TWh of dispatchable storage. Global grid-battery deployment in 2025 was about 0.4 TWh, so this single play could 5Γ it β using dirt.
Wikipedia Rabbit Hole
2026-06-04
Wikipedia: Read the full article
In February 1870, New Yorkers paid 25 cents to descend beneath Broadway and Warren Street into a gaslit waiting room with frescoed walls, a grand piano, a goldfish fountain, and zircon chandeliers. They then boarded a cylindrical car that was blown through a tunnel by a 100-ton fan nicknamed "the Western Tornado." This was the Beach Pneumatic Transit β New York City's first subway β and it had been built largely in secret.
Alfred Ely Beach was not a transit engineer by trade. He was the co-owner and editor of Scientific American, a position he'd held since he was 20. He'd already patented a typewriter for the blind (winning a gold medal at the 1856 Crystal Palace Exhibition) and run one of the most important patent agencies in America, helping a young Thomas Edison file his first patents. But Beach was obsessed with a problem the rest of the city was actively ignoring: New York's streets were drowning in horse manure, gridlock, and the screams of pedestrians being run over by omnibuses.
Beach proposed a subway. Boss Tweed β who controlled Tammany Hall and made fortunes taxing the surface-level streetcar franchises β said no. So Beach got a permit for a pneumatic mail tube, then quietly widened the project until it was big enough to fit a passenger car. Workers dug at night. Dirt was hauled out in muffled wagons. For 58 nights, beneath one of the busiest intersections in America, an entire subway station materialized without the city government knowing.
When Beach unveiled it, 400,000 people rode the demonstration line in its first year. It was a publicity triumph and a political disaster. Tweed retaliated. The state legislature blocked any extension. By the time Tweed fell and Beach finally got approval in 1873, the Panic of 1873 had wiped out his investors. The tunnel was sealed and forgotten.
Here's where it loops back to things you probably know:
The final twist: Beach's pneumatic subway worked. It carried passengers safely, quickly, and cleanly. It failed not because the technology was wrong but because one corrupt politician wanted his cut. New York wouldn't open another subway until 1904 β 34 years after Beach proved it was possible.
Daily YT Documentary
2026-06-04
Channel: AI Documentaries (9 subscribers)
Of the candidates on offer, this is the only one that promises a substantive look at a real, observable phenomenon rather than true-crime rehash, religious polemic, or hashtag-stuffed filler. Twenty-five years after the end of apartheid, South Africa is experiencing a quiet but profound transformation: the gradual retreat of citizens β across racial and economic lines β into private enclaves, gated estates, and self-governing communities that handle their own security, roads, water, and even electricity generation.
The video explores how the failure of municipal services, rolling blackouts from Eskom, and rising crime have pushed South Africans toward a kind of de facto privatized statehood. Places like Orania (an Afrikaner self-governing town) get most of the headlines, but the trend is much broader: residents' associations now run what cities used to, and some communities have effectively seceded from the public infrastructure grid without formally leaving the country.
It's a useful case study in what happens when a state's monopoly on basic services erodes β relevant well beyond South Africa itself. The "AI Documentaries" channel name is a yellow flag (likely AI-narrated and possibly AI-scripted), so treat specific claims with skepticism and verify anything that surprises you, but the underlying topic is genuine and well-documented in mainstream reporting.
Daily YT Electronics
2026-06-04
Channel: MathTech (2150 subscribers)
Most Arduino tutorials in today's batch are variations on the same theme β RFID locks, attendance systems, traffic lights β projects that have been done thousands of times. This CubeSat build stands out because it integrates multiple non-trivial subsystems into a single embedded platform: a flight computer running sensor fusion, GPS positioning, and a real-time telemetry downlink.
What makes this educational is the breadth of concepts you'd touch building it. A working CubeSat-style payload typically involves an IMU (accelerometer/gyro/magnetometer) for attitude data, a barometric pressure sensor for altitude, GPS NMEA parsing over UART, and an RF module (nRF24 or LoRa) for the telemetry link. Each of these is a worthwhile skill on its own β combining them forces you to think about I2C/SPI bus sharing, sampling rates, packet structure, and power budgeting on a constrained 8-bit MCU.
It's also a useful demonstration of how aerospace hobby projects scale down: the same telemetry-and-recovery architecture used here applies to high-altitude balloons, model rocketry, and amateur satellite ground stations. Even if you don't build the exact project, watching how the author wires the sensor stack and structures the telemetry frame is genuinely transferable knowledge.
Caveat: the emoji-heavy title is unfortunate, but the technical scope behind it is real.
Daily YT Engineering
2026-06-04
Channel: Designer (6 subscribers)
Continuous beams β beams spanning multiple supports β are a staple of structural engineering, but they're statically indeterminate, meaning you can't solve them with equilibrium equations alone. This video tackles that problem head-on by working through the moment distribution method (Hardy Cross's classic iterative technique) and then validating the hand calculation against SAP2000, an industry-standard finite element analysis package.
What makes this worth watching is the side-by-side comparison. Manual moment distribution forces you to internalize how stiffness, carry-over factors, and fixed-end moments propagate through a structure β concepts that get hidden when you just type geometry into software. Seeing the hand-computed reactions and bending moments line up (or not) with SAP2000's output is the kind of sanity check that separates engineers who trust their software blindly from those who can spot a bad input or modeling error.
It's also a practical workflow lesson. In real practice, you rarely solve indeterminate beams by hand anymore, but you absolutely need to estimate results well enough to know when the FEA output looks wrong. This is a tiny channel (6 subscribers) and the production is modest, but the technical content is genuine engineering pedagogy β not a clickbait shortcut.
Daily YT Maker
2026-06-04
Channel: Star Hill Timberworks (1700 subscribers)
Most cabin-build videos jump straight to the exciting bits β swinging hammers, raising walls, scribing timbers. This one slows down and tackles the question that actually determines whether a structure will still be standing (and pleasant to live in) decades later: where, exactly, on the land should it sit?
Site selection is one of those skills that's mostly invisible until you get it wrong. A poorly chosen spot means a damp foundation, a roof that catches every winter gust, septic trouble, drainage nightmares, or losing the morning sun you didn't realize you wanted. Star Hill Timberworks looks like a small timber-frame outfit working through a real cabin project from the dirt up, and the framing here β before the first footing is dug β promises the kind of decision-making conversation that rarely makes it onto YouTube.
Expect discussion of grade and water flow, solar orientation, prevailing wind, access for materials and vehicles, distance to utilities, view lines, and the trade-offs between perching on a high point versus tucking into shelter. For anyone considering a cabin, ADU, workshop, or even a backyard shed, the mental model transfers directly.
Small-channel timber-frame content tends to be unhurried and craft-focused, which suits this kind of slow-thinking topic far better than the algorithm-chasing alternatives in today's batch.
Daily YT Welding
2026-06-04
Channel: Somewhere in Oklahoma (754 subscribers)
Of the candidates this week, most are either modular welding table promos, shorts, or hashtag-laden teasers with thin descriptions. This pipe rack build from Somewhere in Oklahoma stands out as the only entry that promises a concrete, finishable shop project with a clear teaching arc: cut, position, and weld pipe stubs into a wall-mounted organizer for grinding and cutoff discs.
Disc storage is one of those overlooked shop problems β discs left loose in drawers chip, absorb moisture, and get mixed up by grit size or bore. A pipe rack solves all three: each disc slides onto its own short pipe nipple, stays vertical, and is visible at a glance. The fabrication itself is a good study in fixturing repetitive parts: getting a row of pipe stubs square to a backing plate and parallel to each other is harder than it looks, and the techniques (tacking, using a square, sequencing welds to manage distortion) transfer directly to any project involving repeated perpendicular members β railing pickets, tube frames, jig plates.
At 754 subscribers the channel is genuinely small, and the title is descriptive rather than clickbait. A solid, practical shop-upgrade watch.
