I built a programming language that punishes you for typing too fast
Most programming languages want you to go faster. Faster compile times, faster iteration, faster shipping. So for TinkerHub's Useless Projects 2.0 hackathon — a Kerala event celebrating gloriously useless software — my teammate Abin Zachariah Abraham and I went the other way: we built a language that actively slows you down. SlowLang (also called TortoiseLang) is a sarcastic, Python-like…
While most programming languages aim to boost your productivity, TinkerHub's Useless Projects 2.0 hackathon presented a different challenge. My teammate Abin Zachariah Abraham and I decided to take the opposite approach and create a language specifically designed to slow you down. Enter SlowLang, a Python-like programming language with its own Tkinter-based IDE, and the focus of this story.
At the heart of SlowLang lies its unique typing-speed enforcer. As you type in the IDE, the system keeps track of your speed. If you cross a predetermined threshold, you're greeted with an ASCII turtle that scolds you with angry messages. These aren't ordinary error messages, though. Instead, they're haikus filled with sarcastic praise, adding a humorous touch to the experience.
But the fun doesn't stop there. SlowLang also includes a lazy mode, which randomly refuses to run your code because, according to the language, the code simply isn't in the mood. The project is accessible through a browser demo, powered by Pyodide, which allows it to run in the browser without requiring any installation.
The engineering behind SlowLang is impressive, considering its intended purpose. The project features a keyboard-event monitor, a state machine that governs the turtle's moods (calm, annoyed, and furious), a rage lockout timer to prevent continuous typing, and a pytest suite to ensure the language adheres to its own specifications. The browser version of the demo mirrors the desktop behavior, providing a seamless experience without the need for installation.
The hackathon's main purpose was to encourage creativity over practicality, and SlowLang delivered on that front. By building this sarcastic language, my teammate and I gained valuable experience in state machines, desktop UI development using Tkinter, proper packaging of Python projects, and porting the same behavior to a WebAssembly runtime for the web demo.
Most importantly, SlowLang not only took first place at Useless Projects 2.0 but also showcased the power of humor in programming. Interested readers can try out SlowLang at https://sebin-gg.github.io/slowlang/ or explore the source code at https://github.com/sebin-gg/slowlang.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.