Korva is a scroll of the internet’s best ideas.

Why Clojure failed

Nubank is a Brazilian digital bank with 140 million customers, and much of its code is written in Clojure. All through 2025 its engineers kept testing models on that code, and the results were bad enough that its most experienced engineer declared it was not going to work.

Catching up late

Opus 4.6 arrived in December 2025, and many people suddenly realized AI coding did work. Nubank's leaders missed the moment. About 60 days later, a few of them were in California meeting early-stage entrepreneurs when it became clear that something fundamental had happened. They tested the newer models on Clojure, and this time it handled the language very well.

The code red

Those 60 days had opened a large gap between Nubank and the best companies using AI. The leaders went back to Brazil and called a code red across the organization. They mapped 120 workflows, including coding, product design, know-your-customer flows, internal audit, compliance, and regulatory capital management, and reinvented each one natively with AI tools. Measuring every step required a lot of new eval infrastructure.

Why do AI models struggle with less common languages?

Models learn from code gathered from public repositories, so a language with less public code gives them fewer examples to learn from. Python and JavaScript have enormous amounts of open-source code, while Clojure has a much smaller community. Clojure is also a Lisp dialect, where programs are nested lists in parentheses and macros rewrite code before it runs, which looks very different from most popular languages. Rich Hickey released Clojure in 2007, and it runs on the Java Virtual Machine.

How do teams test whether AI writes good code?

The usual method is to run the generated code against unit tests. OpenAI researchers introduced the HumanEval benchmark in 2021, with 164 handwritten programming problems, and scored models by whether their functions passed the tests. Company-specific evals work the same way but use the firm's own codebase and test suites. Automated tests can be run thousands of times, which is why they became the standard yardstick.

Why would a bank build on Clojure?

Clojure treats data as immutable by default, so values are not changed in place once created. That makes it easier to reason about what a program did, which suits systems that track money. Nubank acquired Cognitect, the company that stewarded Clojure's development, in 2020.

More from Invest Like the Best with Patrick O'Shaughnessy

Money & InvestingA $20 credit line became $1,000Latin American banks believed people didn't want credit cards. Nubank became the first credit card for 30 million people, and many started with a $20 credit line.
Enjoyed it?