
The Best Programming Language for the End of the World
Mar 26, 2025 6:00 AM Once the grid goes down, an old programming language called Forth—and a new operating system called Collapse OS—may be our only salvation. ILLUSTRATION: SAMUEL TOMSON
Once I started thinking about the apocalypse, it was hard to stop. An unsettling encounter with the doomsday clock that hangs over New York City's Union Square got me frantically searching WikiHow for survival tips. I soon found my way to the doomsday writings of a Canadian programmer named Virgil Dupras. He believes the collapse of civilization is imminent and that it will come in two waves.
First, global supply chains will crumble. Modern technology relies on a delicate web of factories and international shipping routes that are exquisitely vulnerable to rapid climate change. The iPhone uses memory chips from South Korea, semiconductors from Taiwan, and assembly lines in Brazil and China. The severing of these links will, Dupras says, catalyze total societal breakdown.
The second part will happen when the last computer crashes. The complexity of modern hardware means it's nearly impossible to repair or repurpose, and without the means to make new devices, Dupras believes there will be a slow blackout—less bang, more whimper. Routers die. Servers take their last breath. Phones crap out. Nothing works.
Except Collapse OS. Lightweight and designed to run on scavenged hardware, it's Dupras' operating system for the end of the world.
Dupras lives in the countryside of Quebec, Canada, with his wife and two kids, in a 500-person town where people chop their own wood, grow their own food, and sometimes build their own houses. It felt odd sending him a Google Calendar invite—I knew from his trove of essays that he hates big tech. When we spoke, he sounded oddly monotonous. Was it a bad connection? Muffled audio? No. Unlike many of his sustainably minded neighbors, Dupras thinks the battle against climate change is futile. We've already lost. 'Once you've peeped into the abyss, you can't really unsee it,' he says. Dupras has simply accepted his fate, to the point where it's become an article of faith. The same way there are Catholics, there are Collapseniks, he says.
But he's not hopeless. A hopeless man wouldn't prep so monomaniacally for the anti-singularity. Dupras started building Collapse OS in 2019 in an attempt to preserve mankind's ability to program 8-bit microcontrollers. These tiny computers control things like radios and solar panels, and they can be used in everything from weather monitoring to digital storage. Dupras figured that being able to reprogram them with minimal remaining resources would be essential post-collapse. But first he had to teach himself a suitably apocalypse-proofed programming language for the job. ILLUSTRATION: SAMUEL TOMSON
In the late 1950s, the computer scientist Chuck H. Moore was working at the Smithsonian Astrophysical Observatory, predicting the future position of celestial bodies and satellites based on observational data. Machine memory was scarce—these were still the days of punch cards—and Moore needed a way to optimize processing efficiency by minimizing memory use. He developed a program that executed simple commands directly, one at a time, without needing to be recompiled. Over the next decade, it grew into a programming language that he called Forth.
Forth communicates directly with the hardware. It controls a computer's memory via commands called 'Words' that you define on the fly. Because the foundational set of commands sitting under those Words is defined in native machine code, only a small part needs to be translated—meaning a smaller assembler and less RAM. As a result, Forth offers a remarkable amount of what Dupras calls 'power density,' making it the perfect foundation for Collapse OS. That matters because the lights (probably) won't go off forever—instead, our easy world of electricity on tap will be replaced by precious and hard-won local generators. Efficient use of processing power will be pivotal. In a post on Collapse.org, his sprawling manifesto/blog/brain dump/manual, Dupras describes how his discovery of Forth conjured 'what alcoholics refer to as a moment of clarity.'
It took Dupras two years to finish Collapse OS. Booting a copy of it from a USB stick gives tech-savvy users the ability to program microcontrollers, which, in turn, could allow them to automate greenhouses, control phone lines, and even regulate power. But Dupras knew that wouldn't be enough to rebuild society after the collapse. So in 2022, he began work on Dusk OS—a version of Collapse OS that runs on modern devices. Dupras used Forth to build his own compiler that made Dusk OS compatible with code written in C (the foundation of most modern software). This way, without having to rewrite logic that already exists from scratch, Dusk OS is able to retrieve and edit text and access file formats commonly used to back up devices. It can be emulated to work on smartwatches and old tablets and is designed to be hacked and bootstrapped to its user's liking.
At first I couldn't see why any of this would even matter: Surely computer access won't be a priority when we're fighting each other for food? At no point during The Last of Us does Pedro Pascal pause his flight from the zombies to bang out an email. But Dupras makes a good point: What happens after we've reacquainted ourselves with hunting and gathering?
If we want to rebuild society, we'll need to know how. And in the event of a civilizational collapse, a lot of our collective expertise—like my precious WikiHows—will be locked away on hard drives or lost in the cloud. Dupras hopes that Dusk OS will give post-collapse humans access to archives of lost knowledge, like the Svalbard Global Seed Vault for human endeavor. The catch? It's best to have Dusk OS downloaded on an old phone, memory stick, or laptop before the collapse. Otherwise, without the internet, you'll only be able to get it by copying it from someone who already has it installed. Which brings us to the other thing—the reason Dupras equates proficiency in Forth to power. Very few people will have both a copy of Dusk OS and the knowledge to operate it. This select group will hold the keys to rebuilding society and will become, in effect, post-collapse philosopher-kings. It was time for me to go Forth and conquer.
Coding in Forth reminded me of the lawless dystopia in Mad Max . You make your own rules, subject to the limits of the context. You can redefine the IF statement if you so please. You can rewrite machine code instructions for a Word. You can even change Words during run time. Because Words become keywords themselves in Forth, you can create a language that's optimized for a single purpose, packing commands that would otherwise be dozens of lines into just one. 'In Forth, you're creating your own language,' Leo Brodie, author of the first Forth textbook, Starting Forth , told me.
The low-level nature of Forth, while key to its processing power, made programming feel foreign. It uses postfix, a form of mathematical notation that renders 2 + 1 as 2 1+ and which I found neither intuitive nor even really legible. And while most languages allow memory to be broken up and moved around, Forth is stack-based—meaning data is stored chronologically and managed on a last-in/first-out basis. I kept running into bugs, forcing myself to abandon programming conventions I had considered universal. I found myself struggling to speak the language of the machine.
When I emailed Dupras to ask for help, he compared using Forth to driving a stick. It's more granular than C. Where the latter defines calling conventions, variable storage, and return stack management, Forth leaves it all up to the programmer. It directly interacts with memory the same way C does but far outperforms C in precision and efficiency. 'People mistake Forth as just a language,' Dupras says. 'It's a way to interact with the computer.'
The reason Forth isn't more popular is the same reason most of us drive automatics. The personal computing boom of the 1990s sparked an obsession with making tech fit your palm and making code easier to write. Languages were abstracted to protect programmers from themselves, and somewhere along the way, we got lost. Things became bloated for the sake of convenience and, in Dupras' words, started 'oozing inscrutable pus at every corner.'
'The way we understand efficiency is so skewed,' Dupras says. Forth is a scythe to Python's lawnmower. 'If you calculate the number of joules per blade of grass, you'll find that the person scything is more efficient,' he says. 'When you think of speed, you'd see the lawnmower as more efficient.' Forth forces you to be precise and memory-efficient—to marshal your resources carefully, as you would after the collapse. Dupras cuts his own lawn with a scythe, obviously. 'At a certain point, you can go as fast as a lawnmower,' he says.
I began to find my way. Rather than sending bytes into the ether and trusting the system to figure out where they go, as I would in Python, I got used to being responsible for allocating and freeing memory. All I could think about was what was being stored, where it was being stored, and how much space it required. Each line of code suddenly bore weight. I was Immortan Joe, my laptop was my Citadel, and memory was my water.
Soon I found myself refining and revisiting my code like I would a run-on sentence. Instead of expecting the machine to anticipate my needs, I tried to think like the machine, to meet it more than halfway. And because I had to think twice, all the needlessly complicated acronyms that remind us to be concise in other coding languages—YAGNI (you aren't gonna need it), KISS (keep it simple, stupid), DRY (don't repeat yourself)—were rendered obsolete.
After spending days fiddling with Forth, returning to Python felt luxurious. I never had to consider memory scarce, and I never had to thoroughly explain myself. It felt like catching up with an old friend. At that moment, the resources that go into making programming 'user-friendly' became painfully apparent. ILLUSTRATION: SAMUEL TOMSON
Before I met Dupras, I thought of efficiency in terms of speed. But the true costs of that speed are carefully hidden in rural data centers and distant copper mines. I rarely considered the energy required to power each additional gigabyte of RAM, or the fact that cloud computing now has a bigger carbon footprint than the airline industry.
Despite the compounding environmental costs, memory is as cheap and plentiful as it's ever been. Today, languages that sit closer to the machine are only used out of necessity: banks trying to minimize latency for financial trades, spacecraft working with limited onboard resources, outdated systems that would require too much work to update.
But during a civilizational collapse, the quiet luxuries of array handling and automated memory management will largely disappear. As convenience whisks us further away from the machine, we risk forgetting how computers actually work and losing the ability to rebuild our tech in the event of a collapse. 'No one remembers how to write a text editor,' says Devine, an independent programmer who corresponds with Dupras. 'When you start forgetting how to do something as crucial as that, when things start to fall apart, they fall apart hard.'
Devine views efficiency in programming not as a lawnmower or a scythe but as something more like a wildflower meadow—'the least amount of transformation of state possible.' In their view, AI is the pinnacle of 'human-centric' programming, where the computer figures out what you're trying to do and does it for you. Something clicked for me at that moment. As programmers grow more reliant on high-level languages, the average proficiency of low-level languages plummets, which increases the demand for the computing resources that support that abstraction in the first place. AI won't just take our jobs, it'll make us forget how to do them—if we don't run out of the energy to power it first.
But maybe there is another way. Since 2016 Devine and their partner Rek have been living full-time on a small boat in the northern Pacific, and they use lower-level languages like Forth to maximize what they can do with the 190 watts of daily power they get from two solar panels. I found them on a mailing list of roughly a hundred Collapseniks. Their lifestyle was like a sneak preview of the resource-constrained life Dupras expects us all to be living soon. When I reached out for a chat in August, they told me they might have cell service in October.
When we finally connected (audio only), Devine struck me as a younger, more optimistic version of Dupras. While fully sympathetic to Dupras' vision of collapse, Devine believes in the power of low-level programming not for its ability to rebuild society but for its potential to prevent collapse. Devine has observed a growing trend called 'permacomputing' that fosters a more mindful relationship with technology, one that considers resource constraints.
As I returned from the wilderness—back to the world of luxuries like hash tables and built-in libraries that I'd previously taken for granted—I brought back with me a new awareness of the intricacies of the machine, and maybe even a little hope. Forth is how Dupras prepares for the worst, but it's also helping people like Devine and Rek code—and live—more sustainably. If we can all do that, perhaps the end of the world isn't as inevitable as it seems.
Let us know what you think about this article. Submit a letter to the editor at mail@wired.com.
Hashtags

Try Our AI Features
Explore what Daily8 AI can do for you:
Comments
No comments yet...
Related Articles
Yahoo
16 minutes ago
- Yahoo
Apple's Big Developers Event Kicks Off Monday—What You Need To Know
Apple's annual Worldwide Developers Conference kicks off Monday. Analysts expect CEO Tim Cook's keynote address to focus on Apple Intelligence and potentially unveil a new partnership with Google. Apple's stock has struggled in 2025 amid worries about tariffs and the delay of AI features like a more personalized Siri voice (AAPL) annual Worldwide Developers Conference kicks off Monday, when CEO Tim Cook will get a chance to shift the narrative for the iPhone maker as worries about tariffs and AI feature delays have weighed on the company's stock this year. Cook's keynote is scheduled for 1 p.m. ET Monday and is expected to focus heavily on Apple Intelligence, the company's hub of AI features. (You can watch the event here.) Apple could announce new partnerships and apps—including a potential deal with Google that would integrate the Gemini large language model into Apple's AI features, Goldman Sachs analysts said. In April, Alphabet (GOOGL) CEO Sundar Pichai said he hoped Apple and Google could get a deal done by mid-2025, adding that he and Apple's Cook had multiple discussions about a deal last year, according to reporting from Bloomberg. Apple has previously partnered with OpenAI to utilize ChatGPT for features such as Siri, Goldman noted. Apple is also expected to introduce a new software development kit that would allow third-party developers to build AI apps using the LLMs that power Apple Intelligence, the bank said. During last year's developers conference, Cook had unveiled an AI-enhanced, more personalized Siri voice assistant, capable of performing multi-step tasks within other iPhone apps, but that feature has since been delayed until 2026. A more specific timeline could come next week, JPMorgan analysts said. This year, Cook is also expected to unveil the latest iOS for iPhone, iPad, Mac, and other devices ahead of the anticipated iPhone 17 launch this fall. The update could introduce some design changes like rounded icons and translucent displays, and add features like AI-optimized battery usage, Goldman Sachs said. Numerically, it would be iOS 19, but Citi analysts said Apple could start numbering the updates by the upcoming calendar year, which would make the new version iOS 26. The event comes after a tough start to the year for Apple, with shares down 18% for 2025 so far, making it the worst-performing Magnificent Seven stock this year, save for Tesla (TSLA). Read the original article on Investopedia Error in retrieving data Sign in to access your portfolio Error in retrieving data Error in retrieving data Error in retrieving data Error in retrieving data
Yahoo
an hour ago
- Yahoo
Why Robinhood Markets Stock Blasted Nearly 35% Higher in May
It was a busy month for the next-generation online brokerage. It particularly focused its attention on the world of cryptocurrency. 10 stocks we like better than Robinhood Markets › Robinhood Markets (NASDAQ: HOOD) had a scorching 2025 in the first few months of the year, and it continued to barrel ahead in May. The online brokerage's shares saw their value rise almost 35% across the month, according to data provided by S&P Global Market Intelligence, on the back of a well-received earnings report published on the last day of April, plus new and intriguing forays into cryptocurrency and related offerings. While the key figures in that first-quarter earnings release were more or less in the ballpark of analyst expectations, there was no ignoring the hot growth rates posted by Robinhood. Net revenue muscled 50% higher year over year to land at $927 million, thanks to robust year-over-year increases in transaction revenue from facilitating trades in assets such as cryptocurrencies (up by 100% to $252 million), options (56% higher at $240 million), and stocks (44% improvement to $56 million). Speaking of doubling (and then some), Robinhood's net income for the quarter surged 114% higher to $336 million. On top of that, Robinhood announced it was substantially raising the total authorized amount of its current share repurchase program to $1.5 billion from the previous ceiling of $500 million. Management wasn't necessarily thinking hard about stocks in that relatively warm month; no doubt inspired by its clientele's embrace of cryptocurrency, it doubled down on its involvement with digital coins and tokens. In mid-May it announced a deal to buy Canadian company WonderFo Technologies, which owns a pair of regulated cryptocurrency platforms. The total equity value of the deal is roughly 250 million Canadian dollars ($183 million). In its press release touting the deal, Robinhood said that its own "accessible, low-cost, and secure platform will build upon WonderFi's mission and bring millions of Canadians greater access to crypto trading." During the month, Robinhood and crypto technology were connected in a Bloomberg article. The story stated that the brokerage plans to construct a blockchain-based trading system for European investors to transact in U.S. securities. Although details of the apparent plan were scant, it's likely to utilize a digital token-based regime that would allow for those investors abroad to trade U.S. titles quickly and relatively cheaply. Whether or not you're in line with the market's near-35% boost of Robinhood stock on these developments depends heavily on your feelings about cryptocurrency. If you're as bullish as Robinhood management on the future of this asset class, the company's shares are about the best play in the brokerage sphere right now. If not, it might be best for this recent wave of enthusiasm to subside. While I like the company as a business, I'd opt for being more cautious just now. Before you buy stock in Robinhood Markets, consider this: The Motley Fool Stock Advisor analyst team just identified what they believe are the for investors to buy now… and Robinhood Markets wasn't one of them. The 10 stocks that made the cut could produce monster returns in the coming years. Consider when Netflix made this list on December 17, 2004... if you invested $1,000 at the time of our recommendation, you'd have $668,538!* Or when Nvidia made this list on April 15, 2005... if you invested $1,000 at the time of our recommendation, you'd have $869,841!* Now, it's worth noting Stock Advisor's total average return is 789% — a market-crushing outperformance compared to 172% for the S&P 500. Don't miss out on the latest top 10 list, available when you join . See the 10 stocks » *Stock Advisor returns as of June 2, 2025 Eric Volkman has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy. Why Robinhood Markets Stock Blasted Nearly 35% Higher in May was originally published by The Motley Fool Sign in to access your portfolio
Yahoo
an hour ago
- Yahoo
Trump v Elon; Switch 2 review; CA trucking & tariff impacts; Truckstop shake-up
This embedded content is not available in your region. On Episode 846 of WHAT THE TRUCK?!?, Dooner is talking about the news that broke that internet: the Trump versus Elon feud. Musk now says Trump's tariffs will cause a recession this year. What does the falling out mean for freight? We'll take a look. With over 30% of truckers identifying as gamers, is the Switch 2 their new lifeline from boredom during layovers? Is it good for the kids, the dads and the Chads? Dooner has his sons help him review Nintendo's latest console release. Big news out of Truckstop as Kendra Tucker steps down as CEO. The company's founder returns to the CEO desk. Is the loadboard headed toward founder mode? We'll take a look at trucking and tariffs north of the border with Luka Korosec, president at 1% COO Geoff Kelley on how to scale a world-class freight brokerage. Plus, are port futbol teams any good? Chapters1:52 Switch 2 review | The Dooner Boys 14:51 Elon v Trump 19:40 Truckstop shakeup 21:35 How to scale a world-class brokerage | Geoff Kelley 29:32 Port futbol teams 31:17 Canadian trucking | Luka Korosec 35:44 Load security | Luka Korosec 39:35 Tariffs and markets | Luka KorosecCatch new shows live at noon EDT Mondays, Wednesdays and Fridays on FreightWaves LinkedIn, Facebook, X or YouTube, or on demand by looking up WHAT THE TRUCK?!? on your favorite podcast player and at 5 p.m. Eastern on SiriusXM's Road Dog Trucking Channel 146. Watch on YouTube Check out the WTT merch store Visit our sponsor Subscribe to the WTT newsletter Apple Podcasts Spotify More FreightWaves Podcasts The post Trump v Elon; Switch 2 review; CA trucking & tariff impacts; Truckstop shake-up | WHAT THE TRUCK?!? appeared first on FreightWaves.