Daily Digest — 2026-06-30

26 newsletters today.

In this digest


Abandoned Futures

The North American XB-70 Valkyrie: The Mach 3 Bomber That Cruised at 70,000 Feet in 1965 and Got Killed by a Photo Op Collision

2026-06-30

In October 1964, a six-engine white delta-winged aircraft the length of a Boeing 737 rolled out of North American Aviation's Palmdale facility. The XB-70 Valkyrie was the most ambitious bomber ever built: a 500,000-pound nuclear strike platform designed to cruise at Mach 3.1 at 70,000 feet — fast and high enough that no Soviet interceptor could catch it. It flew. It worked. And then a chase plane crashed into it during a publicity photograph and the program died.

The technology was genuinely revolutionary. The XB-70 used a principle called compression lift, discovered by NASA's Alfred Eggers in 1956: at hypersonic speeds, the shock wave from the aircraft's nose could be trapped under the wing, generating up to 30% of total lift for free. Hinged wingtips folded down 65 degrees in cruise to capture this shock and provide directional stability. The airframe was built from brazed stainless steel honeycomb sandwich panels — a manufacturing process so difficult that North American had to invent new welding techniques and a vacuum-furnace brazing process from scratch. The fuel was a special high-density JP-6 that doubled as a heat sink for the airframe, which reached 330°F in cruise.

Why it died: Three forces converged in 1961–66. First, the U-2 shootdown of Gary Powers in May 1960 proved that high altitude was no longer sanctuary; the Soviet S-75 SAM could reach 80,000 feet. Second, Defense Secretary Robert McNamara argued that ballistic missiles made manned bombers obsolete and slashed the program from 250 production aircraft to two prototypes in March 1961. Third, on June 8, 1966, the second XB-70 was performing a formation photo flight for General Electric (whose engines powered all five aircraft in frame) when an F-104 chase plane piloted by NASA's Joe Walker drifted into the Valkyrie's wingtip vortex, flipped over the bomber, and sheared off both vertical stabilizers. Both aircraft crashed. Walker and XB-70 co-pilot Carl Cross died. The surviving prototype made 33 more research flights and was retired in 1969.

Why it's viable now. Every constraint that killed the Valkyrie has inverted:

  • Compression lift is no longer exotic. The Boeing X-51 Waverider (2010–13) flew at Mach 5+ using the same principle. CFD modeling has replaced the wind tunnel guesswork that consumed 60% of the XB-70's $1.5B development cost (≈$15B today).
  • Materials have caught up. Modern titanium-aluminide and ceramic-matrix composites tolerate 1,500°F continuously — the XB-70 was thermally limited to Mach 3. A clean-sheet design could cruise at Mach 4+ without exotic fuels.
  • The mission came back. China's HQ-9 and Russia's S-500 have pushed standoff cruise missiles to their useful range limits. A penetrating high-supersonic platform — exactly what the Air Force's Next Generation Air Dominance bomber adjunct is now studying — solves the same kill chain problem the Valkyrie was designed for.
  • Fly-by-wire makes the canard-delta configuration safe. The XB-70 was statically unstable in pitch at high speed and required constant pilot trim; an F-35-class flight computer makes that trivial.

The XB-70's two prototypes accumulated 129 flight hours. The surviving aircraft sits in the National Museum of the U.S. Air Force in Dayton, still the largest, fastest, highest-flying bomber ever built. Sixty years after first flight, nothing has matched it.

Key Takeaway: The XB-70 proved Mach 3 cruise at 70,000 feet was achievable with 1960s metallurgy — modern composites and CFD make a Mach 4 successor a straightforward engineering project, not a moonshot.

ArXiv Paper Digest

HBM Is Not All You Need: Efficient Disaggregated LLM Serving across Memory-heterogeneous Accelerators

2026-06-30

Authors: Zhixiang Wei, Yun Wang, James Yen, Mingyuan Xia

ArXiv: 2606.29986v1

PDF: Download PDF

When you type a question into ChatGPT and watch the answer stream back, two very different things are happening inside the datacenter. First, the model has to read and understand your prompt — this is called the prefill phase, and it's compute-heavy: the GPU's math units are working flat out. Then, the model has to generate the answer one token at a time — the decode phase — which is memory-heavy: each new token requires shuttling huge piles of cached data in and out of memory.

Modern datacenter GPUs (think H100s and B200s) are built with HBM — High Bandwidth Memory. HBM is spectacular but extremely expensive: it's stacked vertically on top of the GPU, requires exotic packaging, and is in short supply. The dirty secret: during prefill, all that fancy HBM bandwidth sits mostly idle. You're paying premium prices for a feature you barely use half the time.

This paper proposes a clever fix. Since recent systems already split prefill and decode onto separate machines (a trick called disaggregation), why not use different kinds of hardware for each? Specifically:

  • Prefill runs on cheaper accelerators using GDDR memory — the same kind of memory in consumer gaming GPUs. It has less bandwidth than HBM but plenty for compute-bound work.
  • Decode stays on premium HBM-based GPUs, where the bandwidth actually pays off.

The authors call this setup MemHA (memory-heterogeneous accelerators). On paper, it should give you the same performance at a fraction of the cost. In practice, gluing two different hardware types together raises hard questions: how do you move the cached intermediate state ("KV cache") between machines without choking on the network? How do you schedule requests so neither side becomes a bottleneck? How do you handle the awkward mismatch when a fast prefill server hands off to a slower-to-receive decode server?

The paper works through these problems and shows that a well-engineered MemHA system can serve large language models at substantially lower cost than an all-HBM deployment without meaningfully degrading user-facing latency or throughput.

Why it matters: With HBM-equipped GPUs both scarce and ruinously expensive, splitting LLM serving across cheap and premium hardware could meaningfully cut the cost of running AI at scale — and chip away at the supply bottleneck choking the industry.

Daily Automotive Engines

Exhaust Header Collector Diffuser: The Expanding Cone That Pulls Spent Gases Out

2026-06-30

After the merge collector slams four primary tubes into one, the gas still has work to do before it hits the exhaust system. The collector diffuser — a gradually expanding cone downstream of the merge point — is where engineers convert leftover exhaust velocity into static pressure recovery, dropping pressure at the collector entrance and amplifying the scavenging signal sent back up the primaries.

The physics is straight out of a wind tunnel. When a fluid passes through an expanding duct, velocity drops and static pressure rises (Bernoulli). In a header collector, that rising downstream pressure means the gas upstream at the merge throat sees a lower relative pressure — which strengthens the suction pulse that travels back up the primary tube during valve overlap. A well-designed diffuser can recover 40-60% of the dynamic pressure that would otherwise be wasted as turbulence in a blunt step expansion.

Geometry that works:

  • Half-angle: 3.5° to 7° — the sweet spot. Steeper than 7° and the boundary layer separates from the wall, creating turbulence and killing recovery. Shallower than 3.5° wastes length without meaningful gain.
  • Area ratio: 1.8:1 to 2.5:1 — outlet area to throat area. Beyond 2.5:1 you're past the point of diminishing returns for most NA engines.
  • Length: typically 6-10 inches on a 4-cylinder header collector, scaled to fit the area ratio at the chosen half-angle.

Rule of thumb: For a 5° half-angle and a 2:1 area ratio, diffuser length ≈ (D_out − D_in) / (2 × tan 5°) ≈ (D_out − D_in) × 5.7. So expanding from a 2.5" throat to a 3.5" outlet needs roughly 5.7 inches of cone.

Real-world example: Burns Stainless and similar high-end header builders ship merge collectors with integrated diffuser cones — the "tri-Y" style with a 6-7° half-angle expanding into a 3" or 3.5" outlet. Dyno tests on naturally aspirated four-cylinders (think Honda K-series builds) routinely show 5-12 hp gains over a blunt collector with no diffuser, all from the same primaries and merge angle. The diffuser does nothing on its own — it amplifies the scavenging the merge already created.

On turbo applications the diffuser largely disappears, because the turbine housing volute is the next pressure-dropping device. Diffusers are an NA tuning tool, where every Pascal of recovered pressure pulls another molecule of residual gas out of the chamber.

Key Takeaway: The collector diffuser converts wasted exhaust velocity into static pressure recovery, deepening the scavenging pulse without spinning up a single new molecule of gas.

Daily Debugging Puzzle

Go's fmt.Errorf %v vs %w Trap: The Error Wrapper That Doesn't Wrap

2026-06-30

This Go program loads user preferences from disk. If the file doesn't exist (first run), it should silently fall back to defaults. Any other error should be fatal. The function dutifully adds context to the error before returning it. The check at the call site uses errors.Is exactly as the standard library docs recommend. Yet every first-time user hits the fatal branch and sees a crash on launch.

package main

import (
    "errors"
    "fmt"
    "io/fs"
    "os"
)

func loadUserPrefs(path string) (map[string]string, error) {
    data, err := os.ReadFile(path)
    if err != nil {
        return nil, fmt.Errorf("loadUserPrefs(%q): %v", path, err)
    }
    return parsePrefs(data)
}

func main() {
    prefs, err := loadUserPrefs("/home/alice/.myapp/prefs")
    if err != nil {
        if errors.Is(err, fs.ErrNotExist) {
            prefs = defaultPrefs() // first run — silently use defaults
        } else {
            fmt.Println("fatal:", err)
            os.Exit(1)
        }
    }
    run(prefs)
}

The Bug

Look at the format verb: fmt.Errorf("...: %v", err). The %v verb calls err.Error() and splices the resulting string into a brand-new error. The original error object — the one wrapping fs.ErrNotExist down inside an *os.PathError — is discarded. What gets returned is an opaque error whose only relationship to the underlying cause is some text in its message.

When the caller runs errors.Is(err, fs.ErrNotExist), the function walks the error chain by repeatedly calling Unwrap(). The new error returned by fmt.Errorf with %v has no Unwrap() method, so the chain has length one — and that one element is not fs.ErrNotExist. The check returns false, control falls through to the else, and the user gets fatal: loadUserPrefs("..."): open ...: no such file or directory.

The whole point of Go 1.13's error wrapping was to make errors.Is and errors.As work across abstraction boundaries. The mechanism is opt-in: %w wraps (preserving the chain), %v formats (severing it). The two verbs print identically. The bug is invisible in logs, invisible in tests that just check err != nil, and only surfaces when someone tries to inspect which error happened.

The one-character fix:

return nil, fmt.Errorf("loadUserPrefs(%q): %w", path, err)
//                                            ^

Now fmt.Errorf returns a *fmt.wrapError with a working Unwrap(), errors.Is can climb the chain to fs.ErrNotExist, and first-run users get their defaults.

A few related landmines worth knowing:

  • Only one %w per format string before Go 1.20 (multiple are allowed since). Mixing %w with %v for other errors is fine.
  • errors.Is needs a sentinel, not a category. fs.ErrNotExist works because *os.PathError implements an Is method. A random custom error type without Is won't match by "kind" — only by pointer identity.
  • Static analyzers catch this. go vet with the errorsas and related checks, plus linters like errorlint, will flag %v on an error-typed argument. Turn them on in CI.
Key Takeaway: fmt.Errorf with %v stringifies an error into a new opaque one and breaks the chain — always use %w when you want errors.Is and errors.As to keep working at the call site.

Daily Digital Circuits

Pulse Generators and One-Shot Circuits: How Hardware Turns an Edge Into a Fixed-Width Pulse

2026-06-30

Sometimes you don't want a level — you want a pulse. A button press is held for 200ms, but the downstream logic only needs one clock cycle of "go." A SPI chip-select needs a precise 50ns strobe regardless of how long the request signal stays high. The circuit that converts an edge into a fixed-width pulse is called a one-shot (or monostable multivibrator).

The synchronous digital version is dead simple: AND the signal with its own inverted, delayed copy. Pass the input through N flip-flops to make a delay line, invert that delayed version, then AND with the original. The output is high only during the window where the input has risen but the delayed copy hasn't caught up yet — exactly N clock cycles wide.

in    ──┬──────────────── A ──┐
        │                     AND ── pulse_out
        └─[FF]─[FF]─[FF]─ NOT ┘
              (3 cycles)

Real example: edge-detect for a button. Your debounced button goes high and stays high for 300ms. The FSM that increments a counter only wants one increment per press. Feed the button through a single flip-flop, invert it, AND with the raw input: you get exactly one clock cycle of "rising edge detected." This is the most common one-cycle pulse generator in FPGA code, often written as pulse = in & ~in_d1;

The analog version uses an RC network and a Schmitt trigger or 555 timer. A rising edge dumps charge into a capacitor through a resistor; when the cap voltage crosses the threshold, the output flips back. Pulse width = 0.69 × R × C for a 555 in monostable mode. Want a 10µs pulse? Pick R=10kΩ, then C = 10µs / (0.69 × 10000) ≈ 1.45nF.

The gotcha: a naive async one-shot built from a delay chain of inverters (no clock) is a glitch factory. Process, voltage, and temperature can shift the delay by 3× across corners. If downstream logic samples that pulse with a clock, you can violate setup or hold and inject metastability. Always prefer the synchronous flip-flop-based version when a clock is available — its width is exactly N cycles, period.

Retriggerable vs non-retriggerable: a retriggerable one-shot restarts its timer on every new edge (useful for "activity detector" circuits that go low only after silence). A non-retriggerable one ignores edges during its pulse — useful for debounce-style guards where you want to enforce a minimum quiet time.

See it in action: Check out Pulse Width Modulation (PWM) - Electronics Basics 23 by Simply Electronics to see this theory applied.
Key Takeaway: A one-shot converts a level transition into a fixed-width pulse — synchronously, it's just signal AND NOT(delayed_signal); analog versions use RC time constants but cost you predictability across PVT corners.

Daily Electrical Circuits

Switched-Capacitor Filters: Tunable Analog Filters Controlled by a Clock

2026-06-30

A switched-capacitor (SC) filter replaces the resistors in a traditional active filter with capacitors that get rapidly switched between two nodes. The trick: a capacitor C shuttling charge between nodes at frequency fclk behaves like a resistor with value Req = 1 / (fclk · C). Change the clock, change the resistor, change the cutoff frequency — all without touching a single component.

Why bother? Three big wins:

  • Tunability: A digital clock sets your cutoff. No potentiometers, no swapping resistors.
  • IC-friendly: Capacitor ratios on silicon are accurate to 0.1%, while absolute resistor values vary 20%+. SC filters give you precision filtering on-chip.
  • Self-clocking precision: Cutoff frequency tracks your crystal oscillator, not RC tolerance.

The classic part is the MF10 (or its modern cousin, the LTC1064). It's a universal SC filter where you pick lowpass, highpass, bandpass, or notch by connecting pins. The cutoff frequency is locked to the clock by a fixed ratio — typically fclk/f0 = 100 or 50. Want a 1 kHz lowpass? Feed it a 100 kHz clock. Want to sweep from 100 Hz to 10 kHz? Sweep the clock from 10 kHz to 1 MHz.

Real-world example: A spectrum analyzer front-end where you need a tracking bandpass filter. Use an MF10 in bandpass mode with Q=10, drive its clock from a DDS chip, and you've got a filter whose center frequency tracks your sweep without any analog tuning components.

Quick design rule: For an MF10 lowpass with f0 = 2 kHz at the 100:1 ratio, set fclk = 200 kHz. The Q is set by two external resistor ratios (not values!) — for a Butterworth response, R2/R3 ≈ 0.707.

The catch — and it's important: SC filters are sampled-data systems. They alias just like ADCs. You must precede them with a simple RC anti-aliasing filter (cutoff well below fclk/2), and follow them with a reconstruction filter to smooth the staircase output. Clock feedthrough also injects spurs at fclk and its harmonics into your signal — fine for audio if fclk > 100 kHz, deadly for sensitive instrumentation without post-filtering.

Other limits: bandwidth caps around 100 kHz (silicon switch speed), dynamic range typically 80-90 dB (worse than continuous-time active filters), and noise that scales with kT/C.

See it in action: Check out N-Path Filters by ISSCC Videos to see this theory applied.
Key Takeaway: Switched-capacitor filters trade absolute precision for clock-tunable cutoffs and excellent IC matching, making them ideal when you need a digitally-controlled filter with predictable response — just don't forget the anti-aliasing and reconstruction filters that bracket them.

Daily Engineering Lesson

Lobe Pumps: Positive Displacement Without Metal-to-Metal Contact

2026-06-30

A lobe pump looks like a gear pump's cleaner cousin. Two rotors — typically two-, three-, or four-lobed — counter-rotate inside a casing, trapping fluid in the pockets between lobes and the housing wall, then sweeping it from inlet to outlet. The critical difference from a gear pump: the lobes never touch each other. They're held in precise phase by external timing gears in a separate gearbox, so the pumping chamber stays dry-running between the rotors.

That single design choice unlocks the lobe pump's reason for existing. Because nothing rubs in the wetted path, lobe pumps handle:

  • Shear-sensitive fluids — yogurt, cream, blood plasma, fruit pieces in syrup, latex emulsions. Gear pumps would shred them.
  • Sanitary service — the smooth, easily disassembled chambers meet 3-A and EHEDG hygienic standards. This is why nearly every dairy, brewery, and pharmaceutical plant uses them.
  • Solids in suspension — chunks up to a meaningful fraction of the lobe pocket pass through intact.
  • CIP/SIP cleaning — no internal contact surfaces to wear or trap residue.

The tradeoff is slip. Because lobes don't touch and clearances are typically 0.05–0.15 mm, some fluid leaks back from discharge to suction. Slip grows with pressure and falls with viscosity. A lobe pump moving water at 10 bar might lose 30% of its displacement to slip; the same pump moving honey at the same pressure loses almost nothing. Lobe pumps love viscous fluids and hate thin ones at high pressure.

Rule of thumb for sizing: theoretical flow is

Q (L/min) = displacement per rev (L) × RPM × volumetric efficiency

Volumetric efficiency runs ~90–95% on viscous product (>100 cP) at moderate pressure (≤7 bar), dropping to 60–75% on water-like fluids. Typical operating speeds are 200–600 RPM — slower than gear pumps, which keeps shear low and lets larger particles pass.

Concrete example: a yogurt filling line uses a tri-lobe rotary pump with 0.5 L/rev displacement running at 300 RPM. Theoretical flow is 150 L/min; with fruit-on-the-bottom product at 5000 cP, real throughput is about 142 L/min (95% efficient). The same pump on a CIP cycle pushing 80 °C caustic at 3 bar drops to maybe 110 L/min — fine, because CIP doesn't need precision dosing.

Lobe geometry matters: bi-lobe rotors give the largest pockets (best for chunks) but pulsate more; tri-lobe and multi-lobe designs trade pocket size for smoother flow. Helical (twisted) lobes reduce pulsation further at the cost of higher axial loads on the bearings.

See it in action: Check out Know Your Pumps Lobe Pumps by PyeBarkerSupply to see this theory applied.
Key Takeaway: Lobe pumps are the go-to positive displacement choice when you need to move viscous, shear-sensitive, particle-laden, or sanitary fluids — they pay for that versatility with slip losses on thin liquids at high pressure.

Forgotten Books

When "Pin Money" Became Real Money: The Forgotten Revolution of the Backyard Chicken

2026-06-30

Book: Don't Pay More Than Jim Brown's Prices for Super Grade Baby Chicks by Unknown (1864)

Read it: Internet Archive

Buried in a mail-order catalog hawking baby chicks shipped by the boxful sits a single sentence that captures one of the most overlooked economic shifts in American rural life:

"POULTRY is your most profitable crop. It is no longer a 'Pin Money' business but a vitally important part of every farm. Folks have learned that poultry and eggs bring in the cash."

The catalog itself is a marvel of confident folksy salesmanship. Jim Brown — whose operation claimed over 1,500,000 customers and had moved "more than SEVEN and A HALF MILLION baby chicks" in six years — leaned hard on his personal reputation:

"You know Jim Brown. You know that I cannot afford to have a dissatisfied customer. My reputation is at stake every time a box of Jim Brown chicks is shipped."

But the buried gem isn't the salesmanship — it's the phrase "Pin Money."

For most of the 19th century, the henhouse was the wife's domain. Eggs and broilers were sold for small change that women kept separately from the main farm ledger — literal money for pins, thread, ribbon, household trifles. The cash crop was wheat, corn, or cotton, managed by the man of the house. Chickens were an afterthought, scratching around the yard.

Jim Brown's catalog is documenting, in real time, the moment this changed. A few converging technologies made it possible:

  • The U.S. Parcel Post (1913) made it legal and cheap to ship live day-old chicks by mail — they survive 72 hours on absorbed yolk, just enough.
  • Mechanical incubators let hatcheries break free of the broody hen's biology and produce chicks in industrial batches.
  • Breed standardization (Leghorns for eggs, Plymouth Rocks for meat) turned a generic "chicken" into a specialized production animal.

The result, which Jim Brown was both selling and predicting, was the birth of the modern poultry industry. Within a generation, what had been kitchen-garden activity scaled into something that today produces roughly 9 billion broilers a year in the United States alone — more pounds of meat than beef and pork combined.

What's poignant about the forgotten phrase is what it reveals about who lost economic ground in the transition. When chickens were "pin money," the income belonged to the farm wife, off-ledger and at her discretion. When chickens became "a vitally important part of every farm," they got absorbed into the main accounts — and into men's management. The industrialization of poultry was also a quiet expropriation of one of the few independent income streams rural women had.

The modern echo is everywhere. Every time you see a "side hustle" — Etsy shop, weekend Uber, eBay flipping — scale into someone's actual livelihood and stop being theirs alone, you're watching the pin-money-to-cash-crop transition happen again. Jim Brown saw it coming in 1864, one cardboard box of peeping chicks at a time.

The forgotten claim: American poultry was once "pin money" — the farm wife's discretionary cash from selling eggs — until mail-order hatcheries like Jim Brown's industrialized it into a serious crop, quietly absorbing women's independent income into the main farm ledger.

Forgotten Darkroom

The Painter Who Hired a Camera as an Assistant — in 1843

2026-06-30

Book: Art in photography : with selected examples of European and American work by Holme, Charles, 1848-1923, Holland, Clive, 1866-1959 (1905)

Read it: Internet Archive

Tucked into the prefatory note of this 1905 anthology — edited by Charles Holme, founder of The Studio magazine — is a single paragraph that quietly rewrites the origin story of modern image-making:

Mr. Hill was a member of the Royal Scottish Academy, and in the year 1843, at the suggestion of his friend, Sir John Herschel, made use of the, then, new process of photography to aid him in the painting of a picture in which no less than 430 portraits had to be included. So successful was he in his use of the camera that portraits of all the leading Edinburgh people were afterwards produced by him, and he will probably be known in the future as the father of artistic photography.

Think about what's being described. Photography had been publicly announced only four years earlier, in 1839. The daguerreotype was a curiosity, the calotype an experimental stain on salted paper. And here is David Octavius Hill, a working academic painter, faced with the absurd commission of fitting 430 recognizable faces into one canvas (commemorating the 1843 Disruption of the Church of Scotland). Sir John Herschel — the astronomer who would coin the words photograph, negative, and positive — tells him to go use a camera. Hill partners with the chemist Robert Adamson, and the two essentially invent the photographic studio sitting.

What's remarkable is the casualness of the proposal. Herschel didn't pitch photography as art. He pitched it as a productivity tool for portrait painters — exactly the use case that, a century and a half later, would launch entire industries of reference-photo services, FaceApp, and AI image generation. Painters were the first to grasp that capturing a likeness was the bottleneck, not painting it.

And modern evidence backs the claim quietly. The Hill & Adamson archive at the National Galleries of Scotland contains roughly 3,000 calotypes made between 1843 and 1847. The Disruption Picture itself took Hill twenty-three years to finish — a useful reminder that even with the new "AI" of his day, the long tail of the work still belonged to the human hand.

What's been forgotten is the order of operations. We tell schoolchildren that photography killed portrait painting, as if it were an invading species. But for the first generation, photography was painters' assistive technology — commissioned, paid for, and operated by them. The camera worked for the easel before it worked against it.

If that sounds familiar, it should. Every working illustrator now wrestling with whether to use Midjourney for reference plates is replaying Hill's 1843 decision, with the same friend-of-a-scientist nudging them: just use the thing, it'll save you years.

The forgotten claim: Photography was invented as a labor-saving device for portrait painters, and the first great photographer was a painter who picked up the camera on a friend's advice to avoid drawing 430 faces by hand.

Forgotten Patent

Marvin Minsky's "Microscopy Apparatus": The 1957 Patent That Invented Confocal Imaging — Then Sat Unused for Three Decades While Biology Waited for Lasers and Computers

2026-06-30

In 1957, a 30-year-old Junior Fellow at Harvard named Marvin Minsky — the man who would later co-found the MIT AI Lab — was trying to map the neurons of living brain tissue. The problem was light. Conventional microscopes flood the whole specimen at once, and every out-of-focus layer scatters photons back into the image. Looking into a thick tissue slice was like trying to read a book through frosted glass.

Minsky's solution, filed as U.S. Patent 3,013,467 ("Microscopy Apparatus," filed November 7, 1957, granted December 19, 1961), was an act of optical surgery. Instead of illuminating the entire field, he focused light to a single diffraction-limited point. Then, on the return path, he placed a pinhole exactly at the conjugate focus of that point. Any light that came from above or below the focal plane hit the pinhole's metal edge and was discarded. Only photons from the precise spot in focus made it through to the detector.

To build an image, you scanned that point across the specimen — Minsky used a moving stage driven by a tuning-fork mechanism — and reassembled the brightness readings into a picture. He had invented the confocal microscope.

And nobody cared.

The reason was brutally practical. To get a usable image out of a single scanning point, you need:

  • A very bright, very small light source. In 1957 the best Minsky could do was a zirconium arc lamp imaged through an aperture — feeble.
  • A sensitive detector. Photomultiplier tubes existed but were noisy at low light.
  • A way to store and display a scanned 2D image. Minsky used a long-persistence radar oscilloscope screen and photographed it. There was no digital framebuffer because there was no affordable digital anything.

The patent describes all three workarounds with clear-eyed honesty. Minsky later wrote that he tried to interest microscope manufacturers and got nowhere. He let the patent lapse. He made nothing from it.

Then three things happened. Theodore Maiman fired the first laser in 1960, giving biology a point source a million times brighter than an arc lamp. Galvanometer mirrors in the 1970s replaced clunky stage scanning with fast beam steering. And in the 1980s, cheap framebuffers and minicomputers finally let you store a scanned image as pixels and reconstruct 3D stacks slice by slice.

Suddenly Minsky's 1957 geometry — point illumination, pinhole rejection, raster scan — was the obvious architecture for every commercial system. Bio-Rad shipped the MRC-500 in 1987; Zeiss, Leica, and Olympus followed. By the 1990s the laser scanning confocal microscope (LSCM) was the workhorse of cell biology. Today it is how we image GFP-tagged neurons firing, how pathologists screen biopsies, and how every modern super-resolution technique (STED, spinning-disk confocal, two-photon, light-sheet) begins its optical pedigree.

The pinhole is still there. In a $400,000 Leica SP8 sitting in a neuroscience lab right now, the photons trace exactly the path Minsky drew in his 1957 figures.

Minsky's patent is one of the cleanest examples of an invention that arrived before its enabling technologies. The geometry was right. The physics was right. The optical insight — that you can reject out-of-focus light by spatial filtering rather than by sectioning the sample — was a generation ahead. He just needed lasers and computers, both of which were nearly a decade away. By the time the rest of the toolkit existed, his patent had expired and the field had forgotten who filed it.

Key Takeaway: A correct invention filed before its enabling components exist is functionally identical to no invention at all — Minsky's confocal microscope was right in 1957 and unbuildable until 1987, by which time the patent was worthless and the credit was diffuse.

Daily GitHub Zero Stars

pablocs116/river-plastic-ranking

2026-06-30

Language: Jupyter Notebook

Link: https://github.com/pablocs116/river-plastic-ranking

This repository takes on one of the most consequential open questions in ocean conservation: which rivers actually carry the most plastic into the sea? It's an updated, machine-learning-based ranking of global river plastic emissions, built as an extension of the influential 2021 Meijer et al. study that famously concluded just 1,000 rivers contribute roughly 80% of ocean plastic pollution.

The author uses XGBoost — a gradient-boosted tree model — to predict plastic emission rates from hydrological, geographic, and socioeconomic features of river basins worldwide. What makes this repo stand out from a typical academic reproduction is the inclusion of uncertainty quantification, which is genuinely rare in this kind of environmental ML work. Most ranking studies hand you a single number; this one tries to communicate how confident that number actually is.

The topic tags also hint at a Lagrangian transport model component, meaning the work likely goes beyond emissions and tracks where plastic ends up as it drifts through the ocean. That's the bridge between "this river leaks X tons" and "this gyre accumulates Y tons" — a coupling that matters for cleanup prioritization.

Who would benefit from this repo:

  • Environmental data scientists looking for a clean modern XGBoost pipeline applied to a real geospatial problem
  • NGOs like The Ocean Cleanup deciding where to deploy interceptors — the ranking is literally an intervention prioritization tool
  • Graduate students in environmental science who want a worked example of uncertainty quantification on top of tabular ML
  • Policymakers and journalists who cite the Meijer paper and want to see how the picture has evolved

The fact that it's a Jupyter Notebook means the methodology is inspectable end-to-end — no black box, no closed-source pipeline. For a zero-star repo touching a high-impact problem with rigorous methods, this is exactly the kind of work that deserves more visibility.

Why check it out: A rigorous, transparent update to one of the most-cited ocean plastic studies, with the uncertainty quantification that the original lacked.

Daily Hardware Architecture

The Fused Multiply-Add (FMA) Unit: How CPUs Do Two Math Ops in One Rounding Step

2026-06-30

A Fused Multiply-Add computes a * b + c as a single hardware operation with a single rounding at the end. The naive two-instruction sequence (tmp = a * b; result = tmp + c) rounds twice — once after the multiply, once after the add. FMA rounds once, so it's both faster and more accurate.

Why one rounding matters. The intermediate product a * b of two 53-bit mantissas (FP64) is a 106-bit number. A separate multiplier must truncate that to 53 bits before handing it to the adder, losing up to half an ULP. FMA keeps the full 106-bit product alive inside the unit, aligns it against c, then rounds the final 53-bit result. The accuracy gain is exploited by algorithms like Kahan summation, polynomial evaluation (Horner's method), and Newton-Raphson division — where compensated arithmetic relies on the exact unrounded product.

How the hardware fits. An FMA unit is basically a multiplier feeding an adder, but they share a datapath:

  • Multiplier array (Wallace/Dadda tree) produces the 106-bit product in carry-save form — no final addition yet.
  • Aligner shifts c to line up with the product's exponent. Because c's exponent can be wildly different, the aligner needs roughly a 3x-mantissa-width shifter.
  • 3:2 carry-save adder merges the carry-save product with aligned c.
  • Final adder + normalizer + rounder produces the IEEE-754 result.

Real-world example. Intel introduced FMA3 in Haswell (2013). An AVX-256 VFMADD231PD computes 4 FMAs (8 flops) per instruction with 5-cycle latency and 0.5-cycle throughput on Skylake — meaning 16 flops per cycle per core with two FMA units running in parallel. A 3.5 GHz Skylake core therefore peaks at ~56 GFLOPS FP64. Without FMA, you'd need separate multiply (3-cycle) and add (3-cycle) ops chained — doubling latency and halving peak throughput.

Rule of thumb. Modern HPC benchmarks (HPL/LINPACK) only hit advertised peak FLOPS by assuming every operation is an FMA. If your code is pure adds or pure multiplies, your effective peak is half the marketing number. To get full throughput, compilers fuse x*y + z patterns into FMAs — but only if you allow it (-ffp-contract=fast in GCC/Clang). Strict IEEE mode forbids the fusion because the result differs from the two-rounding version.

FMA also enables fast software division and square root via Newton-Raphson: each iteration is two FMAs, and the single-rounding property guarantees quadratic convergence to a correctly-rounded result.

Key Takeaway: FMA halves latency and doubles peak FLOPS by fusing multiply-add into one hardware op with one rounding — and modern CPUs' advertised peak performance assumes you're using it.

Hacker News Deep Cuts

Lidl Self-Checkout SSD Image (GK Retail)

2026-06-30

Someone uploaded a full SSD image of a Lidl self-checkout terminal — running GK Retail's point-of-sale stack — to the Internet Archive. That is the kind of artifact that almost never surfaces publicly. Retail POS software is a strange, expensive, NDA-fenced corner of enterprise computing: GK Software (now part of Fujitsu) powers checkouts for Lidl, Aldi Nord, Walmart, Hornbach, and a long tail of European grocers, but you will not find their binaries on any package mirror.

What likely sits inside an image like this is a goldmine for a specific kind of researcher:

  • The full OS layer — probably a hardened Linux or Windows IoT/Embedded build, with whatever lockdown shell, kiosk wrapper, and remote-management agent the chain uses.
  • GK's CSE (Cloud4Retail / OmniPOS) Java stack — the actual transaction engine, tax logic, EFT/payment integrations, scale and scanner drivers, and the XML/JSON protocols that talk to the back-office.
  • Configuration and certificates — store IDs, VPN endpoints, possibly device certs that hint at how stores authenticate to corporate infrastructure.
  • The receipt printer, MDB coin/note handler, and barcode pipeline — the kind of low-level retail hardware glue that hobbyists building their own POS or arcade-style projects rarely get to study.

For a security-minded audience the appeal is obvious. Self-checkout machines are physically accessible computers handling payment data; their threat model is interesting precisely because the adversary can stand in front of them with a screwdriver. Anyone who has ever watched a self-checkout drop to a Windows desktop or shown a barcode that crashed the till has wondered what is actually running under the hood. Now you can look.

For the reverse-engineering crowd, this is the same flavor of artifact as the leaked McDonald's kiosk images or the various ATM firmware dumps that occasionally surface — a chance to study production enterprise software that is otherwise gated behind seven-figure licensing deals. Expect writeups on hardcoded credentials, debug interfaces left enabled, the kiosk-escape tricks store staff actually use, and the protocols between terminal and store server.

The legal status is murky — this is almost certainly copyrighted proprietary code — so the upload may not stay up long. Worth grabbing a hash and a look while it's there, if only to understand what is running every time you scan a bag of apples.

Why it deserves more upvotes: A full production POS disk image from a major European grocer is an extraordinarily rare research artifact, and zero points means almost nobody has noticed it exists.

HN Jobs Teardown

CTRL-labs (Facebook Reality Labs): What Their Hiring Reveals

2026-06-30

Source: HN Who is Hiring

Posted by: spot

Of the ten postings, CTRL-labs is the most strategically revealing — not because of what it says, but because of who is saying it. A neuroscience-heavy NYC startup is now posting under the banner "part of Facebook Reality Labs." That parenthetical is the entire story.

The stack (such as it is): The posting doesn't list languages or frameworks, which is itself a tell. Instead it lists disciplines: computational neuroscience, machine learning, signal processing, biophysics, and human-computer interaction. When a company recruits by scientific domain rather than by Python or PyTorch, they're hiring researchers who happen to code, not engineers who happen to publish. Expect a stack built around custom DSP pipelines, real-time ML inference on EMG signals, and bespoke data acquisition rigs — the kind of work where the hard problem is the signal, not the framework.

What it reveals about direction: Facebook bought CTRL-labs in late 2019 for a reported ~$500M-$1B. This 2020 posting — still NYC, still onsite, still calling itself "CTRL-labs" rather than "Facebook" — shows Facebook is preserving the acquired team's identity and location rather than absorbing them into Menlo Park. That's a deliberate strategy for retaining specialized neuroscience PhDs who would never relocate for a generic FB badge. The phrase "erasing the bottlenecks between intent and action" is the public-facing pitch for what is, in practice, the input device for AR glasses. Facebook is hiring to win the post-keyboard, post-touchscreen interface war against Apple and Google.

Skills and trends highlighted:

  • Neural interfaces going mainstream: A FAANG is now staffing a wrist-worn EMG team as core infrastructure, not a moonshot.
  • Research Engineer as a hot title: The hybrid role — ship production ML and publish — is becoming the premium hire in applied research labs.
  • Onsite-only at a FAANG in 2020: Suggests proprietary hardware rigs that can't leave the building.

Green flags: Clear mission, well-funded parent, genuinely novel technical surface area, NYC location keeps you out of the Bay Area echo chamber. Red flags: "Facebook Reality Labs" means your work eventually ships inside a Facebook product, with all the data-collection and PR baggage that implies. The posting is also vague on outputs — no mention of shipping deadlines, products, or even what success looks like, which is typical of research orgs but a warning sign for anyone who wants their code in users' hands.

The signal: The big platforms have decided the next computing interface is neural, and they're quietly assembling neuroscience teams under acquired-brand cover to win it.

Daily Low-Level Programming

The Workqueue and kworker Threads: Why Some Kernel Work Runs in a Schedulable Context

2026-06-30

Softirqs and tasklets run in atomic context — they can't sleep, can't block on a mutex, can't call any function that might schedule. That's fine for trivial packet handoff, but a lot of kernel work needs to wait: allocating with GFP_KERNEL, taking a sleeping lock, doing I/O. The workqueue subsystem is the kernel's answer. You queue a work_struct, and a kworker kernel thread picks it up and runs it in process context, where sleeping is legal.

Modern Linux uses concurrency-managed workqueues (CMWQ). Instead of one thread per workqueue (the old model that spawned hundreds of mostly-idle threads), CMWQ maintains shared worker pools per CPU. Each CPU has two pools: a normal-priority pool and a high-priority pool. Workers in a pool service any workqueue bound to that CPU. The pool watches its workers — if every worker is sleeping (blocked on I/O, a mutex, etc.) and there's still pending work, it spawns or wakes another worker. That's the "concurrency-managed" part: thread count tracks runnable work, not queued work.

You'll see them in ps as [kworker/0:1-events] — CPU 0, worker ID 1, currently servicing the events workqueue. The -H suffix means high-priority pool; u (e.g. kworker/u16:2) means unbound — not pinned to a CPU, scheduled wherever the load balancer puts it. Unbound pools matter for work that's CPU-intensive or memory-bandwidth-heavy, where the scheduler should be free to migrate.

Real example: A USB device disconnect fires an interrupt. The IRQ handler can't free the device's data structures — that involves sleeping locks and waiting on in-flight URBs to drain. So it queues work to the usb_hub_wq workqueue. A kworker picks it up, sleeps as needed while teardown runs, and exits. Same pattern for filesystem writeback, async block I/O completion, and most driver deferred work since ~2010.

Rule of thumb: If your deferred work might sleep, use a workqueue. If it absolutely cannot sleep and must run before the next interrupt, use a tasklet or softirq. The cost: workqueue dispatch adds ~1–5 µs of scheduler overhead versus <100 ns for a tasklet. For a 1 Gbps NIC processing a packet every 12 µs, that's a 30%+ tax — which is why network RX uses softirqs, not workqueues.

Check /sys/devices/virtual/workqueue/ to see active queues, their CPU affinity, and per-queue tuning knobs like max_active (caps simultaneous executions of work from one queue).

Key Takeaway: Workqueues let kernel code defer work to a schedulable process context where sleeping is legal, with CMWQ dynamically sizing per-CPU worker pools to match actual concurrency rather than queued volume.

RFC Deep Dive

RFC 3891: The Session Initiation Protocol (SIP) "Replaces" Header

2026-06-30

RFC: RFC 3891

Published: 2004

Authors: R. Mahy, B. Biggs, R. Dean

If you've ever transferred a call on a modern VoIP system, picked up a ringing line from a different desk phone, or moved an in-progress conversation from your desk to your mobile without dropping it, you've used RFC 3891. It's a tiny three-line addition to SIP that quietly powers some of the most useful telephony features of the last twenty years.

The problem. SIP (RFC 3261) was designed around a clean model: INVITE creates a dialog, BYE tears it down, and each dialog is identified by a Call-ID plus two tags. But real telephony needs dialog substitution — the ability for one endpoint to say "take this existing call I'm in, and hand it to that other endpoint instead, atomically." Classic three-way call transfers (REFER + new INVITE) work, but they don't cover scenarios like:

  • Attended transfer: Alice is on a call with Bob, puts him on hold, calls Carol to consult, then wants Bob and Carol connected directly while she drops out.
  • Call pickup: Bob's phone is ringing; Alice wants to grab the call from her own phone.
  • Call park retrieval: A call is parked in slot 701; any phone should be able to retrieve it.
  • Single-line extension / shared appearance: The same call rings on multiple devices and one of them takes over.

The design. RFC 3891 defines exactly one new header. An INVITE can carry a Replaces header naming an existing dialog by its three identifiers:

Replaces: [email protected];to-tag=7743;from-tag=6472

When a UA receives an INVITE with Replaces, it matches the header to a confirmed dialog it's participating in. If the match succeeds and the policy checks pass, it accepts the new INVITE as if it were a re-INVITE on that dialog, then sends BYE on the old dialog. The result: media flows shift to the new peer atomically, with no ring, no glare, no awkward gap.

Why the design choices matter. A few details look pedantic but are load-bearing:

  • Both tags required. Early-dialog matching (only one tag known) was considered and rejected in the general case because it opens race conditions and security holes — though the spec carves out specific rules for replacing early dialogs in the UAC role.
  • Authorization is the implementer's problem. The spec is explicit: a UA must not blindly accept a Replaces just because the dialog IDs match. Otherwise anyone who learns a Call-ID and tags (often visible in logs, SIP trunks, or via eavesdropping) could hijack your call. Real deployments lean on the SIP authentication of the inbound INVITE.
  • Option tag replaces. Endpoints advertise support in Supported:, and a transferor can require it with Require:. This lets transfer flows degrade gracefully when one party is old.
  • Pairs with REFER. The common idiom is REFER with a Refer-To URI that embeds the Replaces parameters as escaped headers — so "transfer Bob to Carol's existing call" becomes a single referral.

Why it still matters. Every PBX, softswitch, and SBC speaking SIP — Asterisk, FreeSWITCH, Cisco CUCM, Avaya, Microsoft Teams' SIP gateway, Zoom Phone, all the carrier-grade kit — implements Replaces. The "blind transfer," "consultative transfer," "directed pickup," and "call park" buttons on hundreds of millions of desk phones are essentially UI veneers over a REFER carrying a Replaces. WebRTC-to-SIP gateways translate browser handoffs through the same mechanism. And as enterprises lift voice into the cloud, Replaces is the primitive that lets a call walk from your desktop softphone to your mobile mid-sentence.

It's a beautiful example of minimal extension design: one header, ten pages of spec, an enormous behavioral payoff.

Why it matters: The "Replaces" header is the one-line SIP extension that makes call transfer, pickup, park, and seamless device handoff possible on virtually every VoIP system in the world.

Stack Overflow Unanswered

Distinguish between removal and despawn

2026-06-30

Stack Overflow: View Question

Tags: rust, bevy, entity-component-system

Score: 1 | Views: 120

The asker is writing a Bevy 0.18 Observer that reacts to the removal of a public marker component (Animated) and tears down an internal bookkeeping component (TimedBy). The observer works fine when Animated is explicitly removed, but it also fires when the whole entity is despawned. At that point the deferred commands.entity(event.entity).remove::<TimedBy>() runs against an entity that no longer exists, producing a warning.

What makes this interesting is that it sits on a subtle ECS lifecycle distinction. In Bevy, despawn is implemented as "remove every component, then deallocate the entity." From the observer's perspective, a despawn is indistinguishable from a targeted remove::<Animated>() — both produce a Remove event with the same entity. The order is what bites you: the observer runs synchronously when the component is removed, but the work it schedules via Commands is deferred until the next command flush. By then, the entity is gone.

Approach 1 — check existence at command time. Wrap the deferred work so it no-ops if the entity is already gone:

fn on_remove_animated(event: On<Remove, Animated>, mut commands: Commands) {
    commands.queue(move |world: &mut World| {
        if let Ok(mut e) = world.get_entity_mut(event.entity) {
            e.remove::<TimedBy>();
        }
    });
}

This is the most robust pattern because it tolerates any race — including despawn from another system that fires between observer and flush.

Approach 2 — use the exclusive form via try_*. Bevy has been moving toward fallible entity command APIs (EntityCommands::try_remove in recent versions). If your version exposes it, swap .remove() for .try_remove() and the warning disappears without an explicit existence check.

Approach 3 — observe Despawn separately. Bevy 0.18 has a Despawn event you can hook with a second observer. But this doesn't solve the underlying problem: the Remove observer still fires during despawn, because despawn really does remove components. You'd need to gate inside the Remove handler on "is this entity also being despawned right now?" — and there's no clean synchronous signal for that, since the despawn command may not have flushed yet.

Gotchas:

  • Don't try to detect despawn by checking world.get_entity() inside the observer itself — the entity is still alive at that point. The mismatch only appears at command-flush time.
  • If you have a chain of observers reacting to Remove, each will face the same race. Centralize the "is entity still alive" check in a small helper.
  • Remove fires per-component during despawn in an undefined order, so don't assume TimedBy is still present when Animated's observer runs.
The challenge: Bevy's Remove observer can't natively distinguish a targeted component removal from a despawn cascade, forcing you to defend against entity-gone-by-flush-time at the command layer.

Daily Software Engineering

The Cache Stampede Problem: When Expiration Triggers a DDoS Against Your Own Database

2026-06-30

A cache stampede (also called a "dogpile") happens when a popular cached value expires and hundreds of concurrent requests all miss the cache simultaneously, all hit the origin database to recompute it, and all write the result back. It's the thundering herd problem's cousin, but with a uniquely cruel twist: the more popular a key is, the worse the stampede.

Picture a homepage feed cached for 60 seconds, serving 10,000 requests per second. The cache expires at second 60. In the next 100ms, ~1,000 requests hit your database simultaneously, each running the same expensive query that normally takes 500ms. Your database, sized for maybe 50 concurrent queries, falls over. Now the cache never gets repopulated, so the next wave of requests also misses, and you're in a death spiral.

Three battle-tested mitigations:

  • Locking (single-flight): When a cache miss occurs, acquire a distributed lock (Redis SETNX with a TTL) before recomputing. Other requests either wait briefly or serve stale data. Go's singleflight package does this in-process; for cross-instance, use Redis. The first request pays the cost; everyone else free-rides.
  • Probabilistic early expiration (XFetch): Each reader independently rolls a dice. As the TTL nears expiration, the probability of refreshing voluntarily rises. The formula: refresh if now - delta * beta * log(random()) >= expiry, where delta is the time to recompute. One unlucky request refreshes early; the stampede never forms.
  • Stale-while-revalidate: Serve the expired value to incoming requests while a single background task recomputes. Browsers and CDNs use this pattern via the stale-while-revalidate Cache-Control directive. Users see slightly stale data for a few hundred milliseconds; your database sees one query.

Real-world example: Facebook documented a 2010 incident where a memcached cluster failure cascaded into a database stampede that took down the site. Their fix combined leases (a form of locking) with stale serving — now standard in their memcache paper.

Rule of thumb: If a cached value takes longer than 1/QPS seconds to recompute, you have a stampede risk. At 1,000 QPS, anything taking more than 1ms to recompute can pile up. Add jittered TTLs (e.g., 60s ± 10s) to prevent synchronized expirations across keys, and combine with one of the three mitigations above for the hot keys.

Don't wait for production to find your hot keys — instrument your cache layer with miss-rate-per-key metrics, and apply stampede protection preemptively to anything in the top 1%.

Key Takeaway: Popular cache keys turn expiration into a self-inflicted DDoS; protect them with locking, probabilistic refresh, or stale-while-revalidate before they take down your database.

Tool Nobody Knows

mmv: Batch File Renaming That Won't Eat Your Data

2026-06-30

Vladimir Lanin wrote mmv in 1989. Thirty-seven years later, developers are still writing this:

for f in *.jpeg; do mv "$f" "${f%.jpeg}.jpg"; done

Or worse, this shudders:

rename 's/\.jpeg$/.jpg/' *.jpeg

Both work for the trivial case. Both fall apart the instant you need to swap, rotate, or merge filenames, and both will happily destroy data when the source set and destination set overlap. mmv was designed from day one to refuse to do that.

The Core Idea

mmv takes a source pattern with wildcards and a destination pattern with numbered backreferences. #1 refers to whatever the first wildcard matched, #2 the second, and so on:

$ mmv '*.jpeg' '#1.jpg'
$ mmv 'report_*_*.pdf' '#2_report_#1.pdf'
$ mmv 'IMG[0-9][0-9][0-9][0-9].JPG' 'photo_#1#2#3#4.jpg'

Character classes count as wildcards too, hence four backreferences for four digits. The patterns are shell-glob style, not regex — readable at 6 AM.

The Killer Feature: A Two-Phase Plan

Before touching a single inode, mmv computes the entire rename graph and checks for collisions, cycles, and lost data. If anything looks wrong, it aborts before doing anything:

$ ls
a.txt  b.txt  c.txt
$ mmv '*.txt' 'all.txt'
a.txt -> all.txt : collision.
mmv: nothing done.

Compare to the shell loop, which would have happily overwritten a.txt with b.txt and then again with c.txt, leaving you with one file and a sinking feeling.

It also handles swaps that would deadlock a naive renamer:

$ ls
foo.txt  bar.txt
$ mmv ';*.txt' '#1#2.tmp.txt' && mmv '*.tmp.txt' '#1.txt'   # the manual way
$ mmv -r 'foo.txt' 'bar.txt'                                  # mmv handles it

Internally it sorts the operations into safe order, using a temp name if it has to break a cycle. You don't think about it.

The Four Tools in One

mmv is actually shorthand for a family controlled by flags:

  • mmv (or -m) — move
  • mcp (or -c) — copy
  • mln (or -l) — hard link
  • mad (or -a) — append (concatenate matched files onto destination)

The append mode is the secret weapon: mmv -a 'log.*' 'all.log' concatenates every rotated log into one file, in glob order, no cat-and-redirect gymnastics. Combined with the collision check, you can't accidentally append a file into itself.

The Dry Run You Actually Trust

$ mmv -n '*.jpeg' '#1.jpg'
a.jpeg -> a.jpg
b.jpeg -> b.jpg
c.jpeg -> c.jpg

-n prints the full plan with zero side effects. Because the same planner runs in real mode, the dry run is exactly what will happen — not a best-guess simulation like the shell-loop equivalent.

Why Not Perl rename?

Perl's rename evaluates an arbitrary Perl expression per file. That's powerful and terrifying. It has no collision detection — rename 's/^\d+_//' * on a directory where two files would map to the same name silently clobbers one. mmv traded the expressiveness of regex substitution for safety guarantees, which is the right trade for the 95% of renames you actually do.

Install: apt install mmv, brew install mmv, or your distro's equivalent. It's 70 KB. It will outlive your shell history.

Key Takeaway: mmv renames files in bulk using glob patterns and backreferences, but its real value is the two-phase planner that detects collisions and cycles before touching a single byte.

What If Engineering

What If We Built a Skyscraper-Sized Maxwell's Demon: A Tower That Sorts Hot and Cold Air for Free Power?

2026-06-30

Maxwell's Demon — the thought experiment where a tiny gatekeeper sorts fast molecules from slow ones, creating a temperature gradient from nothing — is famously forbidden by the Second Law of Thermodynamics. But what if we built a 1-kilometer tower that exploited a real physical sorter: gravity itself? In a tall column of gas, molecules moving upward lose kinetic energy to potential energy. Could a skyscraper-sized atmospheric column generate a usable temperature gradient — and harvest it?

The physics is real but cruel. The dry adiabatic lapse rate for air is g/c_p ≈ 9.8/1005 ≈ 9.75 K/km. A parcel of air rising 1 km cools by about 9.75°C without any heat exchange. So at the top of our tower, air is roughly 10°C colder than at the base. Free temperature difference!

Except — and here's where Maxwell's ghost laughs — this gradient is the equilibrium state. An isolated gas column in gravity reaches isothermal equilibrium (Boltzmann's result), not adiabatic. The lapse rate exists in the real atmosphere only because convection constantly stirs it. You cannot run a heat engine between the top and bottom of a static gas column at equilibrium. If you could, you'd have a perpetual motion machine of the second kind.

But our tower isn't static. The real atmosphere is turbulently mixed, so the 10 K/km gradient is genuinely available. Let's build it.

The design: A 1 km hollow tower, 100 m diameter, open at top and bottom. Inside: a giant heat-pipe loop. Working fluid (ammonia, boiling at ~-33°C) evaporates at the warm base, vapor rises, condenses at the cold top, liquid returns by gravity. The phase-change loop drives turbines.

Back-of-envelope power: Carnot efficiency between T_hot = 293 K (20°C base) and T_cold = 283 K (10°C top) is 1 - 283/293 = 3.4%. Real heat-pipe systems achieve maybe 30% of Carnot, so call it 1%.

Heat flux available equals the mass flow of air × c_p × ΔT. With a 100 m diameter tower and natural draft velocity ~2 m/s:

  • Cross-section: π × 50² ≈ 7,850 m²
  • Mass flow: 7,850 × 2 × 1.2 = 18,800 kg/s
  • Thermal power: 18,800 × 1005 × 10 = 189 MW
  • Electrical at 1%: ~1.9 MW

Powers about 1,500 homes. For a 1-kilometer megastructure costing perhaps $5 billion in steel and concrete, that's $2,600 per watt — roughly 1000× worse than rooftop solar.

The deeper problem: we're not really exploiting gravity. We're a clumsy solar updraft tower. The 10 K gradient is maintained by sunlight heating the ground; our "demon" is just stealing convective enthalpy that the atmosphere would dissipate anyway. Remove the sun and the gradient vanishes within hours as conduction equilibrates the column.

The honest version of this idea already exists: solar updraft towers (Manzanares prototype, 1982). They work, badly. The Maxwell's Demon framing was a fantasy — gravity sorts potential energy, not temperature, and the universe charges full price for the conversion.

Key Takeaway: Gravity creates an apparent temperature gradient in tall air columns, but it's a convective accounting trick — any tower exploiting it is just a mediocre solar chimney wearing a thermodynamics costume.

Wikipedia Rabbit Hole

Quartz clock

2026-06-30

Pick up almost any battery-powered watch, microwave, or wall clock made in the last fifty years and you are holding a tiny, vibrating sliver of silicon dioxide being electrocuted exactly 32,768 times per second. That oddly specific number is not arbitrary — and the story of how it ended up in your wrist is one of the great quiet revolutions of the 20th century.

The phenomenon at the heart of a quartz clock is piezoelectricity, discovered by the Curie brothers in 1880: squeeze a quartz crystal and it generates a voltage; apply a voltage and it physically deforms. Cut the crystal to a precise shape and size and it will ring like a mechanical tuning fork at a frequency determined almost entirely by its geometry — and barely at all by temperature, humidity, or the indignities of daily life.

The first quartz clock was built at Bell Labs in 1927 by Warren Marrison and J.W. Horton. It was a room-sized monster, but it was so accurate it embarrassed the world's best pendulum clocks. By the 1930s, quartz clocks were measuring the rotation of the Earth itself — and revealing, for the first time, that the planet's spin is not constant. The day genuinely wobbles. We only knew because quartz was steadier than the Earth.

So why 32,768 Hz specifically? It is 215. A simple binary counter — fifteen flip-flops in a row — can divide that frequency down to exactly one pulse per second. No multiplication, no awkward arithmetic, just fifteen halvings. The frequency was also chosen to be:

  • Above human hearing (so the watch doesn't whine in your ear),
  • Low enough to sip battery power (higher frequencies waste energy),
  • Compatible with a tiny tuning-fork-shaped crystal that fits inside a watch case.

The crystal is typically cut into a microscopic two-pronged fork just a few millimeters long, sealed in a vacuum can. The vacuum matters — air drag would steal energy and the watch would drift.

And drift it does, just barely. A typical quartz wristwatch is accurate to about 15 seconds per month, roughly 10,000 times better than the best mechanical watches of the early 20th century. That's why, when affordable quartz watches hit shelves in the 1970s, they nearly annihilated the Swiss mechanical watch industry in what's now called the Quartz Crisis — a collapse so severe that Swiss watch employment fell by two-thirds in a decade. The survivors pivoted to selling mechanical movements as luxury craft, which is why a Rolex today is priced like jewelry rather than a timekeeper.

The deeper twist: every modern computer, phone, and GPS receiver also contains a quartz oscillator — usually running at megahertz frequencies — gating every clock cycle of every instruction. The atomic clocks in GPS satellites are corrected against quartz references on the way down. Civilization, in a very literal sense, ticks on cultured slabs of crystallized sand.

Down the rabbit hole: A quartz watch is essentially a vacuum-sealed tuning fork being shocked 32,768 times a second so that fifteen binary flip-flops can count out a perfect tick — and the same trick almost killed the entire Swiss watch industry.

Daily YT Documentary

The Town With ZERO Cars And No Roads: Giethoorn Netherlands

2026-06-30

The Town With ZERO Cars And No Roads: Giethoorn Netherlands

Channel: Across Borders Tv (74 subscribers)

Giethoorn is one of the most genuinely unusual settlements in Europe — a village in the Dutch province of Overijssel where the "streets" are canals, the "cars" are whisper-quiet electric punts, and the houses sit on roughly 180 tiny private islands connected by more than 170 wooden arched footbridges. This video takes you through the village to show how daily life actually works when wheeled vehicles are essentially absent from the historic core.

What you'll learn: The town's origins trace back to around 1230, when peat harvesters dug long trenches to extract fuel. Those trenches gradually filled with water and became the canal network you see today — a rare case of an industrial byproduct becoming the defining feature of a place. The video covers how groceries, construction materials, and even funerals are conducted by boat, why the thatched roofs are so distinctive (thatch was historically the cheapest material available to peat workers), and how the village balances tourism pressure with the needs of roughly 2,600 residents.

Note: The candidate pool today was thin — most options were AI-generated wildlife clips or hashtag-stuffed shorts. This one is a straightforward travel documentary from a tiny channel, but it covers a genuinely interesting piece of geography and urban history without resorting to clickbait.

Why watch: A quick look at a 13th-century peat-mining village that accidentally became Europe's most famous car-free town.

Daily YT Electronics

Compact Arduino RF project featuring a 0.96" OLED display #arduino #arduinoproject

2026-06-30

Compact Arduino RF project featuring a 0.96" OLED display

Channel: Qube 3D (14 subscribers)

Note: this week's batch was unusually thin — most candidates were Shorts, unboxings, or clickbait. This one stood out as the most legitimately educational of the bunch, though it's from a very tiny channel (14 subs) so production value will be modest.

This project pairs an Arduino with a common RF module and a 0.96" SSD1306 OLED display to build a compact handheld unit that visualizes radio activity in real time. It's the kind of small build that teaches a surprising amount: you have to wire up I2C (for the OLED) alongside SPI or digital pins (for the RF transceiver), share timing between display refresh and packet handling, and design a minimal UI that fits in 128×64 pixels.

For anyone learning embedded systems, this is a useful pattern to study. Real-time status monitoring on a tiny display is a recurring requirement — for sensors, ham radio gear, or IoT debugging tools — and seeing how someone structures the loop to keep the radio responsive while updating the screen is more instructive than another blink-LED tutorial.

The description also mentions user interaction, suggesting buttons or an encoder are wired in, which adds a debouncing and state-machine dimension. Worth watching if you want a compact reference build for combining radio + display + input on a single Arduino.

Why watch: A practical reference for combining an RF transceiver, OLED display, and user input on a single Arduino — a foundational pattern for handheld embedded projects.

Daily YT Engineering

How Engineers Optimize Pump Performance with Parametric CFD

2026-06-30

How Engineers Optimize Pump Performance with Parametric CFD

Channel: CFD Support (6670 subscribers)

Of today's batch, this is the one that actually shows a real engineering workflow rather than a hashtag-laden teaser or a marketing reel. Parametric CFD is how modern turbomachinery design gets done — instead of running a single simulation and squinting at the result, engineers sweep across geometric variables (blade angle, impeller diameter, tip clearance, volute shape) and let the solver map out the performance landscape.

The video promises to walk through that loop applied to a pump: define the design parameters, run the batch of CFD cases, then extract head, efficiency, and power curves to find the sweet spot. That's genuinely useful because the gap between "I can run one Fluent case" and "I can use CFD to make a design decision" is exactly this kind of parametric scripting — and it's rarely taught well in coursework.

CFD Support are the folks behind the OpenFOAM-based TCFD toolkit, so expect a vendor flavor, but their content tends to be technically substantive rather than salesy. Worth watching if you're learning turbomachinery design, evaluating CFD workflows, or trying to understand why a pump's best-efficiency point sits where it does.

Note: several of today's candidates were AI-narrated explainers or thinly-described teasers; this was the clearest substantive pick.

Why watch: A concrete look at how parametric CFD turns a single pump simulation into an actual design-optimization tool.

Daily YT Maker

Simple Air Powered Car - Simple Maker Space

2026-06-30

Simple Air Powered Car - Simple Maker Space

Channel: SIMPLE MAKER SPACE (2230 subscribers)

Of the three candidates, this is the clear pick. The Procreate-to-Cricut tutorial is a software workflow walkthrough rather than fabrication, and the ultrasonic mist maker entry is a #shorts video — exactly the format the curation rules tell us to skip. The air-powered car, by contrast, is a proper longer-form build video from a channel dedicated to approachable maker projects.

The build itself is a great vehicle (pun intended) for teaching Newton's third law — compressed air escaping a nozzle pushes the car forward with an equal and opposite reaction. Projects like this are gold for classrooms, homeschoolers, and parents looking for a weekend build, because they require only household materials (bottle caps, skewers, a balloon or syringe for the air source) and the physics is visible in real time. You can tune the wheelbase, axle friction, and nozzle diameter and immediately see the effect on travel distance.

The description does mention a "steam-powered cork gun" in addition to the car, which suggests the channel may cross-pollinate build ideas — worth noting that the title and description are slightly mismatched. Still, the underlying skill set (drilling straight axle holes, reducing rolling friction, sealing a pressure vessel) transfers directly to dozens of other small-scale engineering builds.

Why watch: A hands-on, household-materials build that makes Newton's third law tangible and is easy to replicate with kids or students.

Daily YT Welding

평범한 쇠구슬을 용광로에 넣었더니 벌어진 놀라운 결과 ㄷㄷ #worker #process #blacksmith #forging #kukri

2026-06-30

평범한 쇠구슬을 용광로에 넣었더니 벌어진 놀라운 결과 ㄷㄷ #worker #process #blacksmith #forging #kukri

Channel: Maker's Archive (21 subscribers)

Caveat: every candidate in today's pool is a Short, which usually means surface-level eye candy. This one is the least bad because the description actually names a real technique rather than just spamming hashtags.

The video documents canister forge welding — hundreds of steel ball bearings packed into a steel pipe, brought to welding heat, and consolidated under heavy hammer or press blows until the individual spheres fuse into a single solid billet. It's a niche but legitimate bladesmithing approach: the ball bearings (typically high-carbon 52100) become the "high carbon" component, and the pipe wall contributes the cladding. After welding, the billet is drawn out and eventually shaped into a blade — in this case apparently a kukri.

What makes the process interesting is the forge-welding physics: you need every contact point between every ball to reach a clean, oxide-free welding temperature simultaneously, which is genuinely hard. Smiths usually flush the canister with an inert atmosphere or use a flux-loaded interior to keep scale from poisoning the welds. The resulting pattern, once etched, shows the original spherical packing geometry as a distinctive "bubble" or "honeycomb" damascus pattern.

For a 60-second clip, expect compressed visuals rather than instruction — but if you've never seen ball-bearing canister damascus before, it's a worthwhile introduction to a technique that bridges metallurgy and pattern-welded steel.

Why watch: A quick look at canister forge welding — fusing loose steel balls into a single billet — which produces a distinctive bubble-pattern damascus when finished and etched.

All newsletters