Back to browse
I replaced every function in a codebase with English – it still works

I replaced every function in a codebase with English – it still works

by kulesh·Mar 22, 2026·9 points·6 comments

AI Analysis

●●SolidRabbit HoleBig BrainBold Bet

Replaces every function with English prompts executed by Claude, tests still pass.

Strengths
  • Provocative thesis that code is compressed natural language waiting for LLMs.
  • Passing unit tests on natural language execution proves the concept works.
Weaknesses
  • Latency and cost of calling an LLM per function make it impractical.
  • Hallucination risk remains high for complex logic despite passing unit tests.
Target Audience

Developers, AI researchers

Post Description

Tril converts every function in a repo into plain English descriptions, then runs and tests them — using an LLM as the interpreter instead of a runtime.

The concept: programming languages exist because machines couldn't understand human intent. LLMs can. So what happens if you remove the code entirely and just... describe what each function should do?

The tool replaces functions one by one, runs your test suite after each swap to confirm nothing breaks, and outputs a .md file. Then `tril run` spins up an HTTP server that sends each function's English description to Claude and returns the result.

Tested on a unit converter (JS) and a 625-line Python CLI tool — tests passed, results matched to 6 decimal places (fortunately).

This is mainly a thought experiment: can any code become plain natural language? Will it still work? Let's find out!

npm: npx @sliday/tril convert URL

GitHub: https://github.com/sliday/tril

Similar Projects