gitwtfhub

wtf is whim-lang?

thethumbler/whim-lang — explained in plain English

Analysis updated 2026-05-18

0PythonAudience · developerComplexity · 2/5Setup · easy

TL;DR

A joke esoteric tool that deletes all your code, keeps only the comments, and has an AI rewrite the program from scratch based on what the comments say.

Mindmap

mindmap
  root((whim))
    What it does
      Strips code
      Keeps comments
      AI rewrites program
    Tech stack
      Python
      uv
      OpenRouter
    Use cases
      Comment to code
      Self bootstrapping
      Language experiments
    Audience
      Developers
      Esoteric lang fans

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Strip all real code from a file and keep only its comments as a skeleton.

REASON 2

Have an AI model regenerate a working program purely from your comments.

REASON 3

Experiment with how faithfully an LLM can reconstruct logic from natural-language notes alone.

REASON 4

Run whim on its own source file to regenerate a new copy of itself.

What's in the stack?

PythonuvOpenRouterPygments

How it stacks up

thethumbler/whim-lang0xallam/my-recipe0xhassaan/nn-from-scratch
Stars00
LanguagePythonPythonPython
Last pushed2022-11-22
MaintenanceDormant
Setup difficultyeasymoderatemoderate
Complexity2/52/54/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Requires an OpenRouter API key to call the underlying language model.

Wtf does this do

Whim is a joke esoteric programming tool built on the idea that the actual code you write does not matter, only the comments do. It takes any source file you give it, deletes every line of real code, and keeps only the comments. Then it hands that stripped down skeleton to an AI language model and asks it to write a brand new program based solely on what the comments say the code should do. The result each time is unpredictable. Sometimes the regenerated program works better than the one you started with, sometimes worse, but it will not be the same code you wrote, since none of your original logic survives the process. The tool works with nearly any programming language, because it relies on a library called Pygments to recognize and strip out code in different languages, keeping only comment text intact. To use it you install a Python package manager called uv, set up an API key from a service called OpenRouter that gives access to various AI models, and then run the tool on any file, whether that file is written in Python, Go, Rust, or JavaScript. Whim sends the AI a version of your file with all the actual code blanked out and only the comments left in place, then saves whatever new program the AI writes back. As a demonstration of its own idea, whim's own source file is written so that every function is fully described in its comments, meaning you can run whim on its own main file and it will regenerate a new, working copy of itself purely from those comments, with no guarantee it matches the original. The project openly describes itself as entirely vibe coded, meaning built quickly and loosely with AI assistance rather than carefully engineered, and it comes with no guarantees about correctness. It is meant as a playful experiment about the idea that comments, not code, are what really describe a program.

Yoink these prompts

Prompt 1
Help me install whim and set up an OpenRouter API key to run it.
Prompt 2
Run whim on this Python file and show me what comes back compared to the original.
Prompt 3
Explain how whim uses Pygments to strip code from different programming languages.
Prompt 4
Walk me through whim regenerating its own main.py from its comments.

Frequently asked questions

wtf is whim-lang?

A joke esoteric tool that deletes all your code, keeps only the comments, and has an AI rewrite the program from scratch based on what the comments say.

What language is whim-lang written in?

Mainly Python. The stack also includes Python, uv, OpenRouter.

How hard is whim-lang to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is whim-lang for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.