Lv. MAX
Random thoughts
Legend of Sword and Fairy on DOS: Ported to Rust, Then Upscaled by a Neural Net
Porting the 1995 DOS version of Legend of Sword and Fairy from SDLPAL to Rust in full, running it in the browser, then upscaling it in real time with Real-ESRGAN. Notes on how the port was verified, the mega kernel design, and measured numbers from WebGPU tuning.
Read more about Legend of Sword and Fairy on DOS: Ported to Rust, Then Upscaled by a Neural NetAI Agents Have Compressed Indie Development Into Fragmented Time
Using data from my own 2026 open source projects to look at how AI code agents change the cost structure of indie development: a single project compressed into a few active days, several projects in parallel as the norm. Plus the economic logic, and the limits, of tool software going open source and free once implementation cost approaches zero.
Read more about AI Agents Have Compressed Indie Development Into Fragmented TimeA Decade of Open Source, Absorbed by Large Models, Is Finishing shadowsocks's Original Vision
shadowsocks argued for decentralized deployment and user-defined protocols, but ordinary users could never actually implement them. Ten years of open source contributions now sit inside large models, and even a free, non-SOTA model can produce a working obfuscation plugin in a few hours. For the first time that vision is reachable in practice.
Read more about A Decade of Open Source, Absorbed by Large Models, Is Finishing shadowsocks's Original VisionPorting a 30,000-Line Go Project to Rust with Claude Code: Agent Teams and Harness Tuning
A full account of using Claude Code Agent Team on a large port, taking the Rust rewrite of the mihomo (Clash Meta) proxy core as the case study. Covers role assignment, milestone planning, and tuning CLAUDE.md and the Memory system for efficiency.
Read more about Porting a 30,000-Line Go Project to Rust with Claude Code: Agent Teams and Harness TuningAlgorithmic Discipline, Streaming Restructuring, and Diverging Media Ecologies: Reading C-Pop's Structural Bind Through the Career Paths of Chinese and Japanese New-Generation Singers
Comparing the career paths of Chinese and Japanese new-generation singers: creative control, album narrative, and cross-cultural export as a lens on C-pop's structural bind.
Read more about Algorithmic Discipline, Streaming Restructuring, and Diverging Media Ecologies: Reading C-Pop's Structural Bind Through the Career Paths of Chinese and Japanese New-Generation SingersStructural Challenges to the Petrodollar System: Energy Geopolitics, Gold as a Settlement Substitute, and US Fiscal Sustainability
Using data from multiple sources, this piece examines how the petrodollar system is exposed to non-dollar settlement loops, a capacity mismatch in the gold market, the US private credit crisis and federal fiscal imbalance, and works through three macro scenarios.
Read more about Structural Challenges to the Petrodollar System: Energy Geopolitics, Gold as a Settlement Substitute, and US Fiscal SustainabilityThe 2026 Middle East Crisis, the Helium Cutoff, and the Chain Implosion of the AI Compute Bubble
As of March 2026, the geopolitical conflict in the Middle East has produced a global energy crisis through the closure of the Strait of Hormuz, and with it a break in the helium supply chain. This report takes a second- and third-order view of the causal links and systemic fragilities connecting the energy shock, the helium cutoff, the semiconductor manufacturing bottleneck and the AI capital bubble.
Read more about The 2026 Middle East Crisis, the Helium Cutoff, and the Chain Implosion of the AI Compute BubbleThe Game in the Shadows: China's Shadow Banking and US Private Credit, Their Evolution, Systemic Risk, and a Macroprudential Comparison
Since the 2008 global financial crisis, China's shadow banking and US private credit have each evolved into distinctive systems of non-bank credit intermediation. Drawing on macro data and company-level cases, this piece traces how both systems developed, where their structural fragilities lie, how closely they rhyme across time and geography, and what they threaten in terms of financial stability.
Read more about The Game in the Shadows: China's Shadow Banking and US Private Credit, Their Evolution, Systemic Risk, and a Macroprudential ComparisonClaude Code + Rust: When AI Meets the Strictest Compiler
Using two Rust projects, https_proxy and trans_proxy, as case studies for how an AI coding assistant and a strict compiler form a new programming paradigm. Humans own What and Why, AI owns How, the compiler owns Correctness.
Read more about Claude Code + Rust: When AI Meets the Strictest Compilerhttps_proxy: A Stealth HTTPS Forward Proxy Written in Rust
How https_proxy is designed and how to use it. A stealth HTTPS forward proxy that issues its own TLS certificates and disguises itself as nginx.
Read more about https_proxy: A Stealth HTTPS Forward Proxy Written in RustBuilding a Transparent Proxy Gateway with trans_proxy
How to build a transparent proxy gateway on macOS or Linux with trans_proxy, so every device on your LAN can reach the network through an upstream HTTP CONNECT proxy without any configuration at all.
Read more about Building a Transparent Proxy Gateway with trans_proxyThe Endgame for LLM Hardware: A Heterogeneous Marriage of GPU and LPU
From disaggregated architecture and deterministic compilers to TGV-based CoPoS panel-level packaging, a look at how large model inference hardware reaches a compute singularity through GPU and LPU working together.
Read more about The Endgame for LLM Hardware: A Heterogeneous Marriage of GPU and LPUAn Authenticated TLS Forward Proxy with Caddy and acme.sh
A step-by-step guide to building a secure, efficient HTTPS forward proxy with Basic Auth, using Caddy's forwardproxy plugin and a certificate issued by acme.sh.
Read more about An Authenticated TLS Forward Proxy with Caddy and acme.shThe Relationship Between the US Debt Ceiling, Money Supply, and GDP
There is a complex dynamic relationship among the US federal debt ceiling, the money supply (M2, for example), and gross domestic product. This piece studies all three. It first defines the debt ceiling and its economic significance, and reviews how past adjustments may have affected the money supply and GDP. It then discusses how the Federal Reserve shapes the money supply through monetary policy, and how those operations relate to changes in the level of federal debt. Next it analyzes the dynamic relationship between GDP, the money supply, and federal debt, including indicators such as the velocity of money. The report also picks out key historical moments (the 2008 financial crisis, the 2020 pandemic) to examine how the three moved and interacted, with charts of the historical series to support the conclusions. Finally it introduces the mainstream economic theories that explain the relationship among the three, and discusses recent developments and possible future trends (the current debt ceiling fight, the direction of Fed policy). The hope is that a layered analysis deepens the reader's understanding of how the US debt ceiling, money supply, and GDP relate to one another.
Read more about The Relationship Between the US Debt Ceiling, Money Supply, and GDPSnapshots: Huaihai Road in Early Summer
Tried the X-H2S with the XF 23/1.4. At a 35mm field of view you still need to crop a bit to get a keeper.
Read more about Snapshots: Huaihai Road in Early SummerSnapshots: 8 Hengshan Road
Trying out a new lens, the Sigma 40/1.4
Read more about Snapshots: 8 Hengshan RoadSnapshots: Outskirts of Shanghai in Winter
The pandemic is officially over. Winter 2023 snapshots from around Shanghai.
Read more about Snapshots: Outskirts of Shanghai in WinterSnapshots: The Bund in Autumn
Crisp autumn weather, nothing to do, so I wandered around the Bund and took a few street shots.
Read more about Snapshots: The Bund in AutumnWhat the New Round of US Sanctions Means for Mainland Chinese Semiconductors
The US Department of Commerce announced a set of chip export controls. From now on US companies may not export advanced chips or related manufacturing equipment to mainland China without government approval, and chips made in other countries using US technology fall under the same rules. This post tries to work through what those specific rules may bring.
Read more about What the New Round of US Sanctions Means for Mainland Chinese SemiconductorsThe Development Trap in China's Semiconductor Industry
HGJ, Hanxin, SMIC, HiSilicon, Hongxin, the Big Fund: these few names are more or less a summary of China's semiconductor industry over the past twenty years, each one an expression of a different idea about how to develop it. Looking back at those turning points, it seems we never got out of one particular mental trap, and instead keep making the same mistake over and over.
Read more about The Development Trap in China's Semiconductor IndustryNotes on Autonomous Driving Solutions from Chinese EV Makers
This post summarizes the autonomous driving solutions common in the Chinese EV market and makes a simple comparison between them.
Read more about Notes on Autonomous Driving Solutions from Chinese EV MakersSome Advice on Career Planning
I am about to hit ten years at NVIDIA, so I want to use the occasion to share how my career went over that decade and to offer this year's graduates some personal advice.
Read more about Some Advice on Career PlanningDo We Really Need More AI Chips?
As countless giants and startups design one nearly identical AI chip after another, we need to answer a question: do we really need this many AI chips?
Read more about Do We Really Need More AI Chips?