Urgent.News

What's breaking now, across thousands of outlets.

Tech

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.

Read the original at dev.to →

More in Tech

What Is a VPN? How It Works and When You Actually Need One

Originally published on CodingCush . A VPN, short for Virtual Private Network, is an app that hides your internet traffic inside an encrypted tunnel, so the network you are using cannot see which…

  • VPN encrypts internet traffic and routes it through remote server
  • Hides IP address and online activities from ISP and websites
  • Not a necessity for everyday browsing on private network

Warm Mono: How a Storefront Reads Premium Without an Accent Colour

Most design systems start by choosing a brand colour and spreading it across buttons, links, badges, and highlights. For a storefront, that's often the wrong first move.

  • Stockwell storefront uses Warm Mono system
  • Warm Mono employs monochrome palette with warm charcoal
  • Red is sole accent color for sale tags

More from Monday 9 November →